Fixed character sheet error:ing out if opened when the character doesn't have a spellcastModifierTrait
Some checks are pending
Project CI / build (24.x) (push) Waiting to run

This commit is contained in:
WBHarry 2026-05-04 16:45:17 +02:00
parent 0128106de6
commit 94852cec21

View file

@ -211,7 +211,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
...this.document.system.traits[key], ...this.document.system.traits[key],
label: _loc(CONFIG.DH.ACTOR.abilities[key].label), label: _loc(CONFIG.DH.ACTOR.abilities[key].label),
verbs: CONFIG.DH.ACTOR.abilities[key].verbs.map(x => game.i18n.localize(x)), verbs: CONFIG.DH.ACTOR.abilities[key].verbs.map(x => game.i18n.localize(x)),
isSpellcasting: this.document.system.spellcastModifierTrait.key === key isSpellcasting: this.document.system.spellcastModifierTrait?.key === key
}; };
return acc; return acc;