Fixed armorEffects erroring on isSuppressed when not on an actor

This commit is contained in:
WBHarry 2026-04-05 11:09:00 +02:00
parent 90f4339898
commit dbcef140a2

View file

@ -111,6 +111,8 @@ export default class ArmorChange extends foundry.abstract.DataModel {
}; };
get isSuppressed() { get isSuppressed() {
if (!this.parent.parent?.actor) return false;
switch (this.value.interaction) { switch (this.value.interaction) {
case CONFIG.DH.GENERAL.activeEffectArmorInteraction.active.id: case CONFIG.DH.GENERAL.activeEffectArmorInteraction.active.id:
return !this.parent.parent?.actor.system.armor; return !this.parent.parent?.actor.system.armor;