fix(utils): use typeof for function check

This commit is contained in:
Pooya Parsa 2018-03-19 02:44:27 +03:30
parent 07c40a913a
commit e59152c550

View File

@ -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') {