File tree 1 file changed +8
-1
lines changed
packages/runtime-core/src
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ const getChildRoot = (
163
163
return [ vnode , undefined ]
164
164
}
165
165
const rawChildren = vnode . children as VNodeArrayChildren
166
+ const dynamicChildren = vnode . dynamicChildren as VNodeArrayChildren
166
167
const children = rawChildren . filter ( child => {
167
168
return ! ( isVNode ( child ) && child . type === Comment )
168
169
} )
@@ -171,7 +172,13 @@ const getChildRoot = (
171
172
}
172
173
const childRoot = children [ 0 ]
173
174
const index = rawChildren . indexOf ( childRoot )
174
- const setRoot = ( updatedRoot : VNode ) => ( rawChildren [ index ] = updatedRoot )
175
+ const dynamicIndex = dynamicChildren
176
+ ? dynamicChildren . indexOf ( childRoot )
177
+ : null
178
+ const setRoot = ( updatedRoot : VNode ) => {
179
+ rawChildren [ index ] = updatedRoot
180
+ if ( dynamicIndex !== null ) dynamicChildren [ dynamicIndex ] = updatedRoot
181
+ }
175
182
return [ normalizeVNode ( childRoot ) , setRoot ]
176
183
}
177
184
You can’t perform that action at this time.
0 commit comments