From 800504f5edd7d018f8dfde6c9c8a4afa25ae42c2 Mon Sep 17 00:00:00 2001 From: Ryan Blenis Date: Wed, 13 Nov 2019 17:48:09 -0500 Subject: [PATCH] Retain callHook args as individual arguments --- pluginHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pluginHandler.js b/pluginHandler.js index ced5d439..ea487651 100644 --- a/pluginHandler.js +++ b/pluginHandler.js @@ -70,7 +70,7 @@ module.exports.pluginHandler = function (parent) { obj.callHook = function(hookName, ...args) { for (const p of Object.keys(obj)) { if (typeof obj[p][hookName] == 'function') { - obj[p][hookName](args); + obj[p][hookName].apply(this, args); } } };