From 1d82a6aa60df6740db72c6cfdba5c3fca46dcadb Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Fri, 10 Mar 2023 09:08:10 +0100 Subject: [PATCH] Fix predilection --- modules/heritiers-actor.js | 10 ++++++---- system.json | 4 ++-- templates/actor-sheet.html | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/heritiers-actor.js b/modules/heritiers-actor.js index 1679b0b..fb8b468 100644 --- a/modules/heritiers-actor.js +++ b/modules/heritiers-actor.js @@ -293,10 +293,12 @@ export class HeritiersActor extends Actor { let item = this.items.find(item => item.id == itemId) if (item) { console.log("Item ", item, itemField, dataType, value) - if (dataType.toLowerCase() == "number") { - value = Number(value) - } else { - value = String(value) + if (dataType) { + if (dataType.toLowerCase() == "number") { + value = Number(value) + } else { + value = String(value) + } } let update = { _id: item.id, [`system.${itemField}`]: value }; this.updateEmbeddedDocuments("Item", [update]) diff --git a/system.json b/system.json index 1433e33..02a0b03 100644 --- a/system.json +++ b/system.json @@ -1,7 +1,7 @@ { "id": "fvtt-les-heritiers", "description": "Les Héritiers pour FoundryVTT", - "version": "10.0.22", + "version": "10.0.23", "authors": [ { "name": "Uberwald/LeRatierBretonnien", @@ -19,7 +19,7 @@ "gridUnits": "m", "license": "LICENSE.txt", "manifest": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/raw/branch/master/system.json", - "download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.22.zip", + "download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.23.zip", "languages": [ { "lang": "fr", diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 291ec3c..e1141bc 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -101,7 +101,7 @@ {{/select}} - + {{skill.specList}}