Updating an unrendered template will cause an error
Closed this issue · 0 comments
teroparvinen commented
If something, likely another module, updates or sets a flag on a template that Token Magic is providing graphics for before the template has been rendered, two undefined references will be hit.
In settings.js
, on line 516 template.hud.ruler
will be undefined and on line 518 template.controlIcon
will be undefined. Replacing these lines with this seems to remedy the issue:
if (template.hud.ruler) { template.hud.ruler.renderable = show; }
if (template.controlIcon) { template.controlIcon.renderable = template.owner; }