vttred / ose

Old-School Essentials – Foundry VTT Edition
https://ose.vtt.red
GNU General Public License v3.0
98 stars 57 forks source link

Fix for Treasure Tables not computing successful results. #545

Open JustinFreitas opened 1 month ago

JustinFreitas commented 1 month ago

I noticed that the Treasure Tables were always returning No Results. I looked into it and apparently the docs are wrong for TextEditor.enrichHTML() because it is returning a promise of a string, not a string. This just awaits that call, which fixes the Treasure Table rolling. Yay!

JustinFreitas commented 1 month ago

Huh... only works the first time. Something is still wrong. Any ideas? If not, I can close this down until it works every time.

JustinFreitas commented 2 weeks ago

Wrapping the HTML rendering portion of the method in a setTimeout zero works to correctly populate the chat card every treasure table roll. I'll see if any of the unit tests were affected.