giffyglyph / foundry-5e-monster-maker

A D&D 5e monster maker module for the Foundry VTT. Build new monsters with level-appropriate, balanced stats in seconds.
30 stars 17 forks source link

Fix for issue #65 #68

Closed cmazur14 closed 2 years ago

cmazur14 commented 2 years ago

This is a fix for issue [65]

In foundry 1.9, the Roll object's roll() method was converted to an async method that returned a Promise<Roll> instead of just a Roll. Correcting the issue just involved calling .then(resultingRoll => {...}) to let the script access the result of the Roll object so it could call Roll.toMessage() (instead of calling Promise<Roll>.toMessage(), which is what's been generating the UI error we've been seeing).

giffyglyph commented 2 years ago

Looks good; tested against 9.249. Merging.