diff --git a/src/hable.js b/src/hable.js index 1aba947..17b0037 100644 --- a/src/hable.js +++ b/src/hable.js @@ -5,6 +5,10 @@ export default class Hookable { this._logger = logger this._hooks = {} this._deprecatedHooks = {} + + // Allow destructuring hook and callHook functions out of instance object + this.hook = this.hook.bind(this) + this.callHook = this.callHook.bind(this) } hook (name, fn) {