saif-ellafi / foundryvtt-mythic-gme

Mythic GM Emulator Macros and Roll Tables
Other
27 stars 15 forks source link

Formatted Message macro fails silently when no actors' tokens active in a scene #10

Closed Muttley closed 2 years ago

Muttley commented 2 years ago

Error in console: mythic-gme-tools.js:1680 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'tokens') at Function.mgmeFormattedChat (mythic-gme-tools.js:1680) at eval (eval at _executeScript (foundry.js:16970), <anonymous>:4:50) at Macro.eval (eval at _executeScript (foundry.js:16970), <anonymous>:5:7) at Macro._executeScript (foundry.js:16972) at Macro.execute (foundry.js:16929) at Hotbar._onClickMacro (foundry.js:52384) at HTMLLIElement.dispatch (jquery.min.js:2) at HTMLLIElement.v.handle (jquery.min.js:2) mgmeFormattedChat @ mythic-gme-tools.js:1680 eval @ VM302:4 eval @ VM302:5 _executeScript @ foundry.js:16972 execute @ foundry.js:16929 _onClickMacro @ foundry.js:52384 dispatch @ jquery.min.js:2 v.handle @ jquery.min.js:2

saif-ellafi commented 2 years ago

Thank you for the Fix and pull request, will patch and release soon.