Skip to content

Commit

Permalink
fix: Be a bit more defensive about reaching into party. I somehow got…
Browse files Browse the repository at this point in the history
… a null party member in a game this weekend.
  • Loading branch information
xdy committed Aug 19, 2024
1 parent a623b5a commit a7e3f0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const preCreateChatMessageHook = (message: ChatMessagePF2e, data: any, _o
game?.keyboard.downKeys.has(key),
);
const privateCast = castPrivately(
game.actors?.party?.members?.some((member) => member.id === message.actor?.id) ?? false,
game.actors?.party?.members?.some((member) => member?.id === message?.actor?.id) ?? false,
message,
);

Expand Down

0 comments on commit a7e3f0f

Please sign in to comment.