Skip to content

Commit 55369e8

Browse files
superwfhefeng
authored and
hefeng
committed
refactor: remove repeat line in patch.js (vuejs#6269)
* [release] [email protected] (vuejs#6196) * build(release weex): ignore the file path of entries * [release] [email protected] * style($compile): remove repeat line remove repeat line
1 parent 99e15ba commit 55369e8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/core/vdom/patch.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@ export function createPatchFunction (backend) {
406406
: findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx)
407407
if (isUndef(idxInOld)) { // New element
408408
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm)
409-
newStartVnode = newCh[++newStartIdx]
410409
} else {
411410
elmToMove = oldCh[idxInOld]
412411
/* istanbul ignore if */
@@ -420,13 +419,12 @@ export function createPatchFunction (backend) {
420419
patchVnode(elmToMove, newStartVnode, insertedVnodeQueue)
421420
oldCh[idxInOld] = undefined
422421
canMove && nodeOps.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm)
423-
newStartVnode = newCh[++newStartIdx]
424422
} else {
425423
// same key but different element. treat as new element
426424
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm)
427-
newStartVnode = newCh[++newStartIdx]
428425
}
429426
}
427+
newStartVnode = newCh[++newStartIdx]
430428
}
431429
}
432430
if (oldStartIdx > oldEndIdx) {

0 commit comments

Comments
 (0)