Skip to content

Commit

Permalink
fix bug where hooked functions w/ no hooks weren't ran immediately (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich authored and dluxemburg committed Jul 17, 2018
1 parent f0fd080 commit b1576ab
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 b1576ab

Please sign in to comment.