不要怂,就是干,撸起袖子干!

Commit a1bc2e63 by Daniel Durante

Fixed a small hooks undefined problem.

1 parent 68f920e0
Showing with 2 additions and 2 deletions
...@@ -12,10 +12,10 @@ Hooks.runHooks = function() { ...@@ -12,10 +12,10 @@ Hooks.runHooks = function() {
} }
if (!Array.isArray(hooks)) { if (!Array.isArray(hooks)) {
hooks = [hooks] hooks = hooks === undefined ? [] : [hooks]
} }
if (hooks === undefined || hooks.length < 1) { if (hooks.length < 1) {
return fn.apply(this, [null].concat(args)) return fn.apply(this, [null].concat(args))
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!