Skip to content

Commit

Permalink
fix(ruler): handle out of combat updates
Browse files Browse the repository at this point in the history
  • Loading branch information
phBalance authored and phBalance committed Jan 4, 2024
1 parent fe77bfe commit 4fe8237
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/ruler.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ export class HeroRuler {
(automation === "pcEndOnly" && actor.type === "pc")
) {
// Only consume endurance on token's phase, allowing for Knockback movement (which does not consume END)
if (game.combat.combatant.actorId != actor.id)
if (game.combat?.combatant.actorId != actor.id)
continue;

let combatant = game.combat.combatants.find(
const combatant = game.combat?.combatants.find(
(o) => o.actorId === actor.id,
);
if (combatant) {
Expand Down

0 comments on commit 4fe8237

Please sign in to comment.