From d40669e48d5c3682e3a234758cdd91d641b59a7f Mon Sep 17 00:00:00 2001 From: Rich Snapp Date: Wed, 7 Feb 2018 10:49:22 -0700 Subject: [PATCH] fix bug where hooked functions w/ no hooks weren't ran immediately --- src/hook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hook.js b/src/hook.js index 5ba1d4b9bbf..6c6cefdc56c 100644 --- a/src/hook.js +++ b/src/hook.js @@ -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);