flamewave000 / dragonflagon-fvtt

DragonFlagon FoundryVTT Modules
BSD 3-Clause "New" or "Revised" License
64 stars 62 forks source link

lib-df-buttons: function not defined #390

Open ggagnon76 opened 2 years ago

ggagnon76 commented 2 years ago

Module Library: DF Module Buttons v 1.3.2

Describe the issue Using Hooks.call('reloadModuleButtons') produces the following error: TypeError: this._invokeHandler is not a function.

To Reproduce Steps to reproduce the behavior: See above

Expected behavior this is an object and not the expected ControlManager class.

Screenshots (Optional) image

ggagnon76 commented 2 years ago

Fixed it locally. Just have to bind(this) to your reloadModuleButtons() function.

this.hooksRegister.reloadModuleButtons = Hooks.on("reloadModuleButtons", this.reloadModuleButtons.bind(this))