File tree 3 files changed +15
-6
lines changed
packages/runtime-core/src
3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,9 @@ export function normalizeEmitsOptions(
226
226
}
227
227
228
228
if ( ! raw && ! hasExtends ) {
229
- cache . set ( comp , null )
229
+ if ( comp && typeof comp === 'object' ) {
230
+ cache . set ( comp , null )
231
+ }
230
232
return null
231
233
}
232
234
@@ -236,7 +238,9 @@ export function normalizeEmitsOptions(
236
238
extend ( normalized , raw )
237
239
}
238
240
239
- cache . set ( comp , normalized )
241
+ if ( comp && typeof comp === 'object' ) {
242
+ cache . set ( comp , normalized )
243
+ }
240
244
return normalized
241
245
}
242
246
Original file line number Diff line number Diff line change @@ -966,8 +966,9 @@ export function resolveMergedOptions(
966
966
}
967
967
mergeOptions ( resolved , base , optionMergeStrategies )
968
968
}
969
-
970
- cache . set ( base , resolved )
969
+ if ( base && typeof base === 'object' ) {
970
+ cache . set ( base , resolved )
971
+ }
971
972
return resolved
972
973
}
973
974
Original file line number Diff line number Diff line change @@ -494,7 +494,9 @@ export function normalizePropsOptions(
494
494
}
495
495
496
496
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
+ }
498
500
return EMPTY_ARR as any
499
501
}
500
502
@@ -534,7 +536,9 @@ export function normalizePropsOptions(
534
536
}
535
537
536
538
const res : NormalizedPropsOptions = [ normalized , needCastKeys ]
537
- cache . set ( comp , res )
539
+ if ( comp && typeof comp === 'object' ) {
540
+ cache . set ( comp , res )
541
+ }
538
542
return res
539
543
}
540
544
You can’t perform that action at this time.
0 commit comments