File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,9 @@ export function normalizeEmitsOptions(
226226 }
227227
228228 if ( ! raw && ! hasExtends ) {
229- cache . set ( comp , null )
229+ if ( comp && typeof comp === 'object' ) {
230+ cache . set ( comp , null )
231+ }
230232 return null
231233 }
232234
@@ -236,7 +238,9 @@ export function normalizeEmitsOptions(
236238 extend ( normalized , raw )
237239 }
238240
239- cache . set ( comp , normalized )
241+ if ( comp && typeof comp === 'object' ) {
242+ cache . set ( comp , normalized )
243+ }
240244 return normalized
241245}
242246
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 ( base && typeof base === 'object' ) {
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 ( comp && typeof comp === 'object' ) {
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 ( comp && typeof comp === 'object' ) {
540+ cache . set ( comp , res )
541+ }
538542 return res
539543}
540544
You can’t perform that action at this time.
0 commit comments