Merge pull request #772 from Foundryborne/fix/771-Armor-PreUpdate

[Fix] 771 - Armor preUpdate
This commit is contained in:
Chris Ryan 2025-08-10 19:38:45 +10:00 committed by GitHub
commit 553a86c2b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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));