File tree 3 files changed +6
-5
lines changed
packages/runtime-core/src
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 7
7
hyphenate ,
8
8
isArray ,
9
9
isFunction ,
10
+ isObject ,
10
11
isOn ,
11
12
toNumber ,
12
13
UnionToIntersection
@@ -226,7 +227,7 @@ export function normalizeEmitsOptions(
226
227
}
227
228
228
229
if ( ! raw && ! hasExtends ) {
229
- if ( comp && typeof comp === 'object' ) {
230
+ if ( isObject ( comp ) ) {
230
231
cache . set ( comp , null )
231
232
}
232
233
return null
@@ -238,7 +239,7 @@ export function normalizeEmitsOptions(
238
239
extend ( normalized , raw )
239
240
}
240
241
241
- if ( comp && typeof comp === 'object' ) {
242
+ if ( isObject ( comp ) ) {
242
243
cache . set ( comp , normalized )
243
244
}
244
245
return normalized
Original file line number Diff line number Diff line change @@ -966,7 +966,7 @@ export function resolveMergedOptions(
966
966
}
967
967
mergeOptions ( resolved , base , optionMergeStrategies )
968
968
}
969
- if ( base && typeof base === 'object' ) {
969
+ if ( isObject ( base ) ) {
970
970
cache . set ( base , resolved )
971
971
}
972
972
return resolved
Original file line number Diff line number Diff line change @@ -494,7 +494,7 @@ export function normalizePropsOptions(
494
494
}
495
495
496
496
if ( ! raw && ! hasExtends ) {
497
- if ( comp && typeof comp === 'object' ) {
497
+ if ( isObject ( comp ) ) {
498
498
cache . set ( comp , EMPTY_ARR as any )
499
499
}
500
500
return EMPTY_ARR as any
@@ -536,7 +536,7 @@ export function normalizePropsOptions(
536
536
}
537
537
538
538
const res : NormalizedPropsOptions = [ normalized , needCastKeys ]
539
- if ( comp && typeof comp === 'object' ) {
539
+ if ( isObject ( comp ) ) {
540
540
cache . set ( comp , res )
541
541
}
542
542
return res
You can’t perform that action at this time.
0 commit comments