File tree 2 files changed +3
-8
lines changed
2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 6
6
isDef ,
7
7
isUndef ,
8
8
isTrue ,
9
- isObject ,
10
- isFunction
9
+ isObject
11
10
} from 'core/util/index'
12
11
13
12
function ensureCtor ( comp , base ) {
@@ -70,12 +69,12 @@ export function resolveAsyncComponent (
70
69
const res = factory ( resolve , reject )
71
70
72
71
if ( isObject ( res ) ) {
73
- if ( isFunction ( res . then ) ) {
72
+ if ( typeof res . then === 'function' ) {
74
73
// () => Promise
75
74
if ( isUndef ( factory . resolved ) ) {
76
75
res . then ( resolve , reject )
77
76
}
78
- } else if ( isDef ( res . component ) && isFunction ( res . component . then ) ) {
77
+ } else if ( isDef ( res . component ) && typeof res . component . then === 'function' ) {
79
78
if ( isDef ( res . error ) ) {
80
79
factory . errorComp = ensureCtor ( res . error , baseCtor )
81
80
}
Original file line number Diff line number Diff line change @@ -14,10 +14,6 @@ export function isTrue (v: any): boolean {
14
14
return v === true
15
15
}
16
16
17
- export function isFunction ( v : any ) : boolean {
18
- return typeof v === 'function'
19
- }
20
-
21
17
/**
22
18
* Convert a value to a string that is actually rendered.
23
19
*/
You can’t perform that action at this time.
0 commit comments