We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dfc5c1 commit 0902086Copy full SHA for 0902086
src/main.js
@@ -20,12 +20,13 @@ export default {
20
}
21
for (let hook in plugin.hooks) {
22
if (hook_registry[hook] === undefined) {
23
- hook_registry[hook] = plugin.hooks[hook]
+ hook_registry[hook] = Array.isArray(plugin.hooks[hook])?
24
+ plugin.hooks[hook] : [plugin.hooks[hook]]
25
26
// console.debug(plugin.name + ": registering a component for hook '" + hook + "'")
27
28
// add plugin's component(s) to registry
- if (Array.isArray(hook_registry[hook])) {
29
+ if (Array.isArray(plugin.hooks[hook])) {
30
hook_registry[hook].concat(plugin.hooks[hook])
31
} else {
32
hook_registry[hook].push(plugin.hooks[hook])
0 commit comments