:sprakles: Support for bundled hooks
This commit is contained in:
parent
0207fe35f8
commit
a4854735b9
1 changed files with 4 additions and 0 deletions
|
@ -215,6 +215,10 @@ Pattern.prototype.loadPluginHooks = function(plugin) {
|
|||
for (let hook of this.hooks.all) {
|
||||
if (typeof plugin.hooks[hook] === "function") {
|
||||
this.on(hook, plugin.hooks[hook]);
|
||||
} else if (typeof plugin.hooks[hook] === "array") {
|
||||
for (let method of plugin.hooks[hook]) {
|
||||
this.on(hook, method);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue