From 5074a65183464a847db30c6aead24defba8e90f9 Mon Sep 17 00:00:00 2001 From: nsalyzyn Date: Fri, 19 Dec 2025 10:28:51 -0700 Subject: [PATCH] Explicitely adding the false value rather than relying on undefined returns. Oops --- module/data/actor/character.mjs | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index 83dc3c16..9231d2d5 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -445,20 +445,22 @@ export default class DhCharacter extends BaseDataActor { if (item.system.originItemType !== CONFIG.DH.ITEM.featureTypes.subclass.id) { return true; } - if (this.class.subclass) { - const prop = item.system.multiclassOrigin ? 'multiclass' : 'class'; - const subclassState = this[prop].subclass?.system?.featureState; - if (!subclassState) return false; + if (!this.class.subclass) return false; - if ( - item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.foundation || - (item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.specialization && - subclassState >= 2) || - (item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.mastery && subclassState >= 3) - ) { - return true; + const prop = item.system.multiclassOrigin ? 'multiclass' : 'class'; + const subclassState = this[prop].subclass?.system?.featureState; + if (!subclassState) return false; + + if ( + item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.foundation || + (item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.specialization && + subclassState >= 2) || + (item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.mastery && subclassState >= 3) + ) { + return true; + } else { + return false; } - } } get sheetLists() {