Moerill / fvtt-pointer

MIT License
6 stars 16 forks source link

[BUG] check if canvas is disabled before initializing the module #36

Open shawly opened 2 years ago

shawly commented 2 years ago

Since FVTT 0.8.6 you can disable the canvas within the settings on the client side. This produces some errors in the console since keybindings.js#L114 and L150 use canvas.app and canvas.controls properties which are undefined when the canvas is disabled.

Adding a check for game.settings.get("core", "noCanvas") which should be false before initialization of your code should prevent these errors.