Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 51a94b6

Browse filesBrowse 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
Copy full SHA for 51a94b6

File tree

1 file changed

+1
-3
lines changed
Filter options

1 file changed

+1
-3
lines changed

‎src/core/vdom/patch.js

Copy file name to clipboardExpand all lines: src/core/vdom/patch.js
+1-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.