However The debug method first makes a check for the debug variable. And int his case it is hitting the else condition so calls into Utils.getSetting('debug')
getSetting has a catch block that calls Logger.debug so if the setting is not found and the catch runs we end up in an infinite loop looking for the debug flag.
This causes an infinite loop, breaking with a stack overflow
ils.js:18 Uncaught (in promise) RangeError: undefined. Maximum call stack size exceeded
[Detected 2 packages: token-action-hud-core, foundry-4e-tools]
at Logger.debug (utils.js:18:90)
at Utils.getSetting (utils.js:176:20)
at Logger.debug (utils.js:18:90)
at Utils.getSetting (utils.js:176:20)
at Logger.debug (utils.js:18:90)
Steps to reproduce
Creating a sample hook listener that immediately calls debug should do the trick.
Describe the bug
However The debug method first makes a check for the debug variable. And int his case it is hitting the
else
condition so calls intoUtils.getSetting('debug')
getSetting has a catch block that calls
Logger.debug
so if the setting is not found and the catch runs we end up in an infinite loop looking for the debug flag.This causes an infinite loop, breaking with a stack overflow
Steps to reproduce Creating a sample hook listener that immediately calls debug should do the trick.
Versions:
Additional context Any additional context.