From e59152c550e90e4f0e2600a09eaa81c976619864 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 19 Mar 2018 02:44:27 +0330 Subject: [PATCH] fix(utils): use typeof for function check --- lib/common/utils.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common/utils.mjs b/lib/common/utils.mjs index 96730ab8c3..2559e79b16 100644 --- a/lib/common/utils.mjs +++ b/lib/common/utils.mjs @@ -133,8 +133,8 @@ export const parallel = function parallel(tasks, fn) { export const chainFn = function chainFn(base, fn) { /* istanbul ignore if */ - if (!(fn instanceof Function)) { - return + if (typeof fn !== 'function') { + return base } return function () { if (typeof base !== 'function') {