diff --git a/scripts/module.js b/scripts/module.js index 0d1de5a..8a1b176 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -182,8 +182,8 @@ function getUIOffset(position) { function isHelpfulOrHarmful(data) { const relevantSignificance = []; - const isRollerGood = data.rollingActor.alliance === "party"; - const isDCGood = data.actorWithDc.alliance === "party"; + const isRollerGood = data?.rollingActor?.alliance === "party"; + const isDCGood = data?.actorWithDc?.alliance === "party"; const isAttack = data.chatMessage?.flags?.pf2e?.context?.type === "attack-roll"; if (isRollerGood) relevantSignificance.push("ESSENTIAL");