Skip to content

Commit 0902086

Browse files
committed
better variable names
1 parent 5dfc5c1 commit 0902086

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ export default {
2020
}
2121
for (let hook in plugin.hooks) {
2222
if (hook_registry[hook] === undefined) {
23-
hook_registry[hook] = plugin.hooks[hook]
23+
hook_registry[hook] = Array.isArray(plugin.hooks[hook])?
24+
plugin.hooks[hook] : [plugin.hooks[hook]]
2425
}
2526
// console.debug(plugin.name + ": registering a component for hook '" + hook + "'")
2627

2728
// add plugin's component(s) to registry
28-
if (Array.isArray(hook_registry[hook])) {
29+
if (Array.isArray(plugin.hooks[hook])) {
2930
hook_registry[hook].concat(plugin.hooks[hook])
3031
} else {
3132
hook_registry[hook].push(plugin.hooks[hook])

0 commit comments

Comments
 (0)