Open friction1 opened 5 months ago
The only place I even see the word Promise in the code is in a comment: MonsterBlock5e.js
/**
Looks like something in v12 changed to async, and it's not being awaited.
This section seems to be the issue in MonsterBlock5e.js for v12, the last line:
static handlebarsHelpers = {
"moblok-hascontents": (obj) => { // Check if an array is empty.
return obj && Object.keys(obj).length > 0;
},
"moblok-enrichhtml": (str, owner, flags) => { // Formats any text to include proper inline rolls and links.
// Note: in v12 the async option will be deprecated
// enrichment should happen in getData() and not during rendering
// that would be a big refactor so I'm not going to try it now...
return TextEditor.enrichHTML(str || "", { secrets: (owner && !flags["hidden-secrets"]), async: false });
}
}
"async: false" doesn't work anymore in v12 as mentioned here: https://foundryvtt.com/article/v10-text-editor/
This is how the core 3.2.1 dnd5e system implements it for items: https://github.com/foundryvtt/dnd5e/blob/a010ce7e6768ac1301cd53c821c05e9fcce03dcb/module/applications/item/item-sheet.mjs
Oof, my own code comments are quite ominous. This is going to be a big issue to fix.
Everything clicks just fine but the descriptions of actions look like this.
MacOS v12.327 dnd5e 3.2.1