diff --git a/src/sync.mjs b/src/sync.mjs index 965567e..f421ccc 100644 --- a/src/sync.mjs +++ b/src/sync.mjs @@ -150,7 +150,7 @@ export function enrich_actor(actor) { actor.system.details.race.name : '' - clone_pc.attributes.spellcaster = Boolean(Object.values(clone_pc.spells).map(s => s.max ?? 0).sum()) + clone_pc.attributes.spellcaster = Boolean(Object.values(actor.system?.spells).map(s => s?.max ?? 0).sum()) return {