mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(utils): use typeof for function check
This commit is contained in:
parent
07c40a913a
commit
e59152c550
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user