Describe the bug
AS GM, when updating the prototype token of a 'character' actor and no token is placed on the canvas, the "hasCondition" function throws an uncaught error at line 1429 'if (!actor.effects.size) continue;' due to entities in line 1405 being an array with one element of type 'undefined'.
To Reproduce
Steps to reproduce the behavior:
Set up "Exhaustion 1-5" in CUBlab for Tidy5e Sheet Exhaustion
Open "Prototype Token"
Press "Update Token"
Expected behavior
Either check, if actor object exists in line 1429 or if element in entities array is not of type 'undefined' in line 1405
Module Version: v0.6.16
Describe the bug AS GM, when updating the prototype token of a 'character' actor and no token is placed on the canvas, the "hasCondition" function throws an uncaught error at line 1429 'if (!actor.effects.size) continue;' due to entities in line 1405 being an array with one element of type 'undefined'.
To Reproduce Steps to reproduce the behavior:
Expected behavior Either check, if actor object exists in line 1429 or if element in entities array is not of type 'undefined' in line 1405
Browser:
Foundry Version: v9 Build 269
Game System: dnd5e v1.6.3
Additional context CUB v1.9.2 Tidy5e Sheet v0.5.33