Skip to content

Commit

Permalink
Merge pull request #545 from JustinFreitas/await-enrichhtml-async-true
Browse files Browse the repository at this point in the history
  • Loading branch information
Rughalt authored Dec 24, 2024
2 parents 29686f2 + 3197798 commit d6173fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/module/helpers-treasure.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function drawTreasure(table, data) {
const text = r.getChatText(r);
data.treasure[r.id] = {
img: r.img,
text: TextEditor.enrichHTML(text, { async: false }),
text: await TextEditor.enrichHTML(text, { async: true }),
};
if (
r.type === CONST.TABLE_RESULT_TYPES.DOCUMENT &&
Expand Down Expand Up @@ -118,7 +118,8 @@ export async function rollTreasure(table, options = {}) {
}
});
}


await new Promise(resolve => requestAnimationFrame(resolve));
const html = await renderTemplate(
`${OSE.systemPath()}/templates/chat/roll-treasure.html`,
templateData
Expand Down

0 comments on commit d6173fa

Please sign in to comment.