Skip to content

Commit

Permalink
Added nullish check for Actors
Browse files Browse the repository at this point in the history
  • Loading branch information
ChasarooniZ committed Jun 19, 2024
1 parent de52739 commit 0effb4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 0effb4d

Please sign in to comment.