File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 3 files changed +16
-6
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,9 @@ export function normalizeEmitsOptions(
226227 }
227228
228229 if ( ! raw && ! hasExtends ) {
229- cache . set ( comp , null )
230+ if ( isObject ( comp ) ) {
231+ cache . set ( comp , null )
232+ }
230233 return null
231234 }
232235
@@ -236,7 +239,9 @@ export function normalizeEmitsOptions(
236239 extend ( normalized , raw )
237240 }
238241
239- cache . set ( comp , normalized )
242+ if ( isObject ( comp ) ) {
243+ cache . set ( comp , normalized )
244+ }
240245 return normalized
241246}
242247
Original file line number Diff line number Diff line change @@ -966,8 +966,9 @@ export function resolveMergedOptions(
966966 }
967967 mergeOptions ( resolved , base , optionMergeStrategies )
968968 }
969-
970- cache . set ( base , resolved )
969+ if ( isObject ( base ) ) {
970+ cache . set ( base , resolved )
971+ }
971972 return resolved
972973}
973974
Original file line number Diff line number Diff line change @@ -494,7 +494,9 @@ export function normalizePropsOptions(
494494 }
495495
496496 if ( ! raw && ! hasExtends ) {
497- cache . set ( comp , EMPTY_ARR as any )
497+ if ( isObject ( comp ) ) {
498+ cache . set ( comp , EMPTY_ARR as any )
499+ }
498500 return EMPTY_ARR as any
499501 }
500502
@@ -534,7 +536,9 @@ export function normalizePropsOptions(
534536 }
535537
536538 const res : NormalizedPropsOptions = [ normalized , needCastKeys ]
537- cache . set ( comp , res )
539+ if ( isObject ( comp ) ) {
540+ cache . set ( comp , res )
541+ }
538542 return res
539543}
540544
You can’t perform that action at this time.
0 commit comments