After your recent refactoring, the save button is once again broken when debug logging is enabled, only logging
ReferenceError: imageNameFormat is not defined
at TokenReplacerSetup._updateObject (token-replacer.js:152)
to the console. This is caused by this part of the code which I fixed just last week:
if (isTRDebug) {
if (folderNameFormat === "proper") {
folderNameFormat = " ";
}
if (imageNameFormat === "proper") {
imageNameFormat = " ";
}
console.log(`Token Replacer: Format Structure Setup: '${tr_tokenDirectory.activeSource}/${tr_tokenDirectory.current}/${diffName}${folderNameFormat}0_25/Monster${imageNameFormat}Name.png'`);
}
because after your recent changes, these nameFormat variables no longer exist (instead you use the index from the dropdown in line 113, right below my now-outdated comment about not using const).
The logging should be changed accordingly (or removed entirely).
After your recent refactoring, the save button is once again broken when debug logging is enabled, only logging
to the console. This is caused by this part of the code which I fixed just last week:
because after your recent changes, these nameFormat variables no longer exist (instead you use the index from the dropdown in line 113, right below my now-outdated comment about not using
const
). The logging should be changed accordingly (or removed entirely).