File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ export function initSlots(
40
40
if ( ! rawSlots ) return
41
41
if ( ! isArray ( rawSlots ) ) rawSlots = [ rawSlots ]
42
42
43
- const hasDynamicSlot = rawSlots . some ( slot => isDynamicSlotFn ( slot ) )
44
- if ( ! hasDynamicSlot ) {
43
+ if ( ! rawSlots . some ( slot => isDynamicSlotFn ( slot ) ) ) {
45
44
instance . slots = { }
46
45
// with ctx
47
46
const slots = rawSlots [ 0 ] as StaticSlots
@@ -51,7 +50,7 @@ export function initSlots(
51
50
return
52
51
}
53
52
54
- const resolved : StaticSlots = ( instance . slots = shallowReactive ( { } ) )
53
+ instance . slots = shallowReactive ( { } )
55
54
const keys : Set < string > [ ] = [ ]
56
55
rawSlots . forEach ( ( slots , index ) => {
57
56
const isDynamicSlot = isDynamicSlotFn ( slots )
@@ -77,7 +76,7 @@ export function initSlots(
77
76
: dynamicSlot && dynamicSlot . name === name )
78
77
) {
79
78
recordNames . delete ( name )
80
- delete resolved [ name ]
79
+ delete instance . slots [ name ]
81
80
}
82
81
}
83
82
} )
@@ -89,7 +88,7 @@ export function initSlots(
89
88
} )
90
89
91
90
function registerSlot ( name : string , fn : Slot , recordNames ?: Set < string > ) {
92
- resolved [ name ] = withCtx ( fn )
91
+ instance . slots [ name ] = withCtx ( fn )
93
92
recordNames && recordNames . add ( name )
94
93
}
95
94
You can’t perform that action at this time.
0 commit comments