Skip to content

Commit

Permalink
fix bug where hooked functions w/ no hooks weren't ran immediately (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich authored and jaiminpanchal27 committed Feb 8, 2018
1 parent 63f9411 commit f73db9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function createHook(type, fn, hookName) {
}

function hookedFn(...args) {
if (_hooks.length === 0) {
if (_hooks.length === 1 && _hooks[0].fn === fn) {
return fn.apply(this, args);
}
return types[type].apply(this, args);
Expand Down

0 comments on commit f73db9e

Please sign in to comment.