Skip to content

Commit 51a94b6

Browse files
superwfztlevi
authored andcommitted
refactor: remove repeat line in patch.js (vuejs#6269)
* [release] weex-vue-framework@2.4.2-weex.1 (vuejs#6196) * build(release weex): ignore the file path of entries * [release] weex-vue-framework@2.4.2-weex.1 * style($compile): remove repeat line remove repeat line
1 parent bcb5413 commit 51a94b6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/core/vdom/patch.js

Lines changed: 1 addition & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy