Retain callHook args as individual arguments

This commit is contained in:
Ryan Blenis 2019-11-13 17:48:09 -05:00
parent e7d662f2f4
commit 800504f5ed
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ module.exports.pluginHandler = function (parent) {
obj.callHook = function(hookName, ...args) { obj.callHook = function(hookName, ...args) {
for (const p of Object.keys(obj)) { for (const p of Object.keys(obj)) {
if (typeof obj[p][hookName] == 'function') { if (typeof obj[p][hookName] == 'function') {
obj[p][hookName](args); obj[p][hookName].apply(this, args);
} }
} }
}; };