From b2fa4e28ceafc75bb0fb895af7fa0d6e3634bb65 Mon Sep 17 00:00:00 2001 From: p4535992 Date: Thu, 11 Aug 2022 10:47:14 +0200 Subject: [PATCH] version 0.10.3 --- changelog.md | 4 ++++ package.json | 2 +- src/module.json | 6 +++--- src/module/lib/lib.ts | 7 +++++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 1cc3886..873a435 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +### 0.10.3 + +- Bug fix [[BUG] Can no longer delete inventory items.](https://github.com/VanirDev/VariantEncumbrance/issues/68) + ### 0.10.1-2 - Add integration with DAE diff --git a/package.json b/package.json index a771fa3..d2619af 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "variant-encumbrance-dnd5e", - "version": "0.10.2", + "version": "0.10.3", "description": "VariantEncumbrance+Midi", "scripts": { "package": "gulp package", diff --git a/src/module.json b/src/module.json index 2311402..c2907fb 100644 --- a/src/module.json +++ b/src/module.json @@ -2,7 +2,7 @@ "name": "variant-encumbrance-dnd5e", "title": "Variant Encumbrance+Midi", "description": "A module for D&D 5th Edition, to automatically modify character carry weights to match the Variant Encumbrance optional rule set.", - "version": "0.10.2", + "version": "0.10.3", "author": "Vanir#0001 (discord), 47Y, p4535992", "authors": [ { "name": "Vanir#0001 (discord)" }, @@ -81,8 +81,8 @@ "url": "https://github.com/VanirDev/VariantEncumbrance", "manifest": "https://github.com/VanirDev/VariantEncumbrance/releases/latest/download/module.json", "download": "https://github.com/VanirDev/VariantEncumbrance/releases/latest/download/module.zip", - "readme": "https://github.com/VanirDev/VariantEncumbrance/blob/v0.10.2/README.md", - "changelog": "https://github.com/VanirDev/VariantEncumbrance/blob/v0.10.2/changelog.md", + "readme": "https://github.com/VanirDev/VariantEncumbrance/blob/v0.10.3/README.md", + "changelog": "https://github.com/VanirDev/VariantEncumbrance/blob/v0.10.3/changelog.md", "bugs": "https://github.com/VanirDev/VariantEncumbrance/issues", "allowBugReporter": true, "manifestPlusVersion": "1.2.0", diff --git a/src/module/lib/lib.ts b/src/module/lib/lib.ts index d5c0131..8afe4dd 100644 --- a/src/module/lib/lib.ts +++ b/src/module/lib/lib.ts @@ -489,7 +489,7 @@ export function retrieveActiveEffectDataChangeByKey(actor: Actor, key: string): continue; } const c = retrieveActiveEffectDataChangeByKeyFromActiveEffect(actor, key, aef.data.changes); - if (c.value) { + if (c && c.value) { valueDefault = c; break; } @@ -501,13 +501,16 @@ export function retrieveActiveEffectDataChangeByKeyFromActiveEffect( actor: Actor, activeEffectDataChangeKey: string, effectChanges: EffectChangeData[], -): EffectChangeDataProperties { +): EffectChangeDataProperties|undefined { const effectEntityChanges = effectChanges.sort((a, b) => a.priority - b.priority); const atcvEffectChangeData = effectEntityChanges.find((aee) => { if (aee.key === activeEffectDataChangeKey && aee.value) { return aee; } }); + if(!atcvEffectChangeData || !atcvEffectChangeData.value){ + return undefined; + } let myvalue = ''; if (atcvEffectChangeData.value && String(atcvEffectChangeData.value).includes('data.')) { // Retrieve the formula.