From c94b74c33934f15b8f2e89c9535b9532a261804c Mon Sep 17 00:00:00 2001 From: Christopher Renaud Oelerich Date: Wed, 21 Feb 2024 23:16:32 +0100 Subject: [PATCH] fix invalid reference in sync code --- src/sync.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {