From 52f940bb5171de7998d5e4e6b4f6e05967b2d9ed Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 10 Aug 2025 11:35:18 +0200 Subject: [PATCH] Fixed so armor preUpdate doesn't fail if no system changes are made --- module/data/item/armor.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/data/item/armor.mjs b/module/data/item/armor.mjs index 01e1d186..a8c3dcec 100644 --- a/module/data/item/armor.mjs +++ b/module/data/item/armor.mjs @@ -60,7 +60,7 @@ export default class DHArmor extends AttachableItem { const allowed = await super._preUpdate(changes, options, user); if (allowed === false) return false; - if (changes.system.armorFeatures) { + if (changes.system?.armorFeatures) { const removed = this.armorFeatures.filter(x => !changes.system.armorFeatures.includes(x)); const added = changes.system.armorFeatures.filter(x => !this.armorFeatures.includes(x));