File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -386,15 +386,15 @@ export function createPatchFunction (backend) {
386
386
'Make sure each v-for item has a unique key.'
387
387
)
388
388
}
389
- if ( elmToMove . tag !== newStartVnode . tag ) {
390
- // same key but different element. treat as new element
391
- createElm ( newStartVnode , insertedVnodeQueue , parentElm , oldStartVnode . elm )
392
- newStartVnode = newCh [ ++ newStartIdx ]
393
- } else {
389
+ if ( sameVnode ( elmToMove , newStartVnode ) ) {
394
390
patchVnode ( elmToMove , newStartVnode , insertedVnodeQueue )
395
391
oldCh [ idxInOld ] = undefined
396
392
canMove && nodeOps . insertBefore ( parentElm , newStartVnode . elm , oldStartVnode . elm )
397
393
newStartVnode = newCh [ ++ newStartIdx ]
394
+ } else {
395
+ // same key but different element. treat as new element
396
+ createElm ( newStartVnode , insertedVnodeQueue , parentElm , oldStartVnode . elm )
397
+ newStartVnode = newCh [ ++ newStartIdx ]
398
398
}
399
399
}
400
400
}
You can’t perform that action at this time.
0 commit comments