File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 77 hyphenate ,
88 isArray ,
99 isFunction ,
10+ isObject ,
1011 isOn ,
1112 toNumber ,
1213 UnionToIntersection
@@ -226,7 +227,7 @@ export function normalizeEmitsOptions(
226227 }
227228
228229 if ( ! raw && ! hasExtends ) {
229- if ( comp && typeof comp === 'object' ) {
230+ if ( isObject ( comp ) ) {
230231 cache . set ( comp , null )
231232 }
232233 return null
@@ -238,7 +239,7 @@ export function normalizeEmitsOptions(
238239 extend ( normalized , raw )
239240 }
240241
241- if ( comp && typeof comp === 'object' ) {
242+ if ( isObject ( comp ) ) {
242243 cache . set ( comp , normalized )
243244 }
244245 return normalized
Original file line number Diff line number Diff line change @@ -966,7 +966,7 @@ export function resolveMergedOptions(
966966 }
967967 mergeOptions ( resolved , base , optionMergeStrategies )
968968 }
969- if ( base && typeof base === 'object' ) {
969+ if ( isObject ( base ) ) {
970970 cache . set ( base , resolved )
971971 }
972972 return resolved
Original file line number Diff line number Diff line change @@ -494,7 +494,7 @@ export function normalizePropsOptions(
494494 }
495495
496496 if ( ! raw && ! hasExtends ) {
497- if ( comp && typeof comp === 'object' ) {
497+ if ( isObject ( comp ) ) {
498498 cache . set ( comp , EMPTY_ARR as any )
499499 }
500500 return EMPTY_ARR as any
@@ -536,7 +536,7 @@ export function normalizePropsOptions(
536536 }
537537
538538 const res : NormalizedPropsOptions = [ normalized , needCastKeys ]
539- if ( comp && typeof comp === 'object' ) {
539+ if ( isObject ( comp ) ) {
540540 cache . set ( comp , res )
541541 }
542542 return res
You can’t perform that action at this time.
0 commit comments