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
Labels
bug
Something isn't working
Describe the bug
In the hook for
updateCombat
starting at line 62 inturnmarker.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:
game.combat.addCombatant({ name: "DUMMY" });
Expected behavior
The turn marker should be removed from the previous token, even if the next combatant has no token.
Screenshots
![image](https://user-images.githubusercontent.com/182554/98399356-e0aa4280-2027-11eb-83f5-87a903a2c5f2.png)
Additional context
I ran into this while developing a module that modifies the initiative behavior, but this occurs with no modules as well.
The text was updated successfully, but these errors were encountered: