Fixed so armor preUpdate doesn't fail if no system changes are made

This commit is contained in:
WBHarry 2025-08-10 11:35:18 +02:00
parent a26e6aface
commit 52f940bb51

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