Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

[BUG] Unhandled null in updateCombat hook, Turn Marker not removed from previous combatant when switching to a tokenless combatant. #23

Open
BoltsJ opened this issue Nov 6, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@BoltsJ
Copy link

BoltsJ commented Nov 6, 2020

Describe the bug
In the hook for updateCombat starting at line 62 in turnmarker.js, an exception is thrown if a combatant has no token associated with it.

Environment Details
Foundry VTT Version: 0.7.5
Turn Marker Version: 2.6.9

To Reproduce
Steps to reproduce the behavior:

  1. Set up a combat
  2. run game.combat.addCombatant({ name: "DUMMY" });
  3. Move the turn to the dummy combatant.
  4. An uncaught exception is logged and the turn marker is not removed from the previous combatant until the next switch.

Expected behavior
The turn marker should be removed from the previous token, even if the next combatant has no token.

Screenshots
image

Additional context
I ran into this while developing a module that modifies the initiative behavior, but this occurs with no modules as well.

@BoltsJ BoltsJ added the bug Something isn't working label Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants