The Tidy 5e sheet rewrite integration call was placed in getSheetHooks(), which is called
on startup
each time the character sheet renders
The Tidy integration is designed to be called only once. Because it is being wired every time the sheet renders, the character sheet hook feature is stacking and causing the macro to execute multiple times in a single click.
Essentially, it is calling a "Hook within a Hook" right now, which is why it is stacking the event handler additively. If possible, the Tidy integration code needs to be moved somewhere where it is only called one time, such as during systemHandler().
Also, the Tidy integration is already checking the "charsheet" and "click" settings, so it does not require the extra check:
The Tidy 5e sheet rewrite integration call was placed in
getSheetHooks()
, which is calledThe Tidy integration is designed to be called only once. Because it is being wired every time the sheet renders, the character sheet hook feature is stacking and causing the macro to execute multiple times in a single click.
Essentially, it is calling a "Hook within a Hook" right now, which is why it is stacking the event handler additively. If possible, the Tidy integration code needs to be moved somewhere where it is only called one time, such as during
systemHandler()
.Also, the Tidy integration is already checking the "charsheet" and "click" settings, so it does not require the extra check: