File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ export const createFor = (
256256 const previousKeyIndexMap = new Map ( previousKeyIndexPairs )
257257 const operations : ( ( ) => void ) [ ] = [ ]
258258
259+ let mountCounter = 0
259260 const relocateOrMountBlock = (
260261 blockIndex : number ,
261262 blockItem : ReturnType < typeof getItem > ,
@@ -280,6 +281,7 @@ export const createFor = (
280281 )
281282 }
282283 } else {
284+ mountCounter ++
283285 operations . push ( ( ) =>
284286 mount (
285287 source ,
@@ -310,7 +312,7 @@ export const createFor = (
310312 relocateOrMountBlock ( i , blockItem , blockKey , - 1 )
311313 }
312314
313- const useFastRemove = operations . length === newLength
315+ const useFastRemove = mountCounter === newLength
314316
315317 for ( const leftoverIndex of previousKeyIndexMap . values ( ) ) {
316318 unmount (
You can’t perform that action at this time.
0 commit comments