Skip to content

Commit

Permalink
fixing error on strike with no target
Browse files Browse the repository at this point in the history
  • Loading branch information
mysurvive committed Jun 25, 2024
1 parent 8922197 commit 0e068e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/module/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ async function updateWeaknessType(message, speaker) {
return;

const strikeTarget = await fromUuid(
message.getFlag("pf2e-thaum-vuln", "targets")[0].actorUuid
message.getFlag("pf2e-thaum-vuln", "targets")[0]?.actorUuid
);

if (strikeTarget.primaryUpdater !== game.user) return;
if (!strikeTarget || strikeTarget.primaryUpdater !== game.user) return;

const evEffect = strikeTarget.items.find(
(i) =>
Expand Down

0 comments on commit 0e068e5

Please sign in to comment.