From 1b96ba7019077235bc3ad0888b00ab9285789edb Mon Sep 17 00:00:00 2001 From: superwf Date: Wed, 6 Sep 2017 03:54:53 +0800 Subject: [PATCH] refactor: remove repeat line in patch.js (#6269) * [release] weex-vue-framework@2.4.2-weex.1 (#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 --- src/core/vdom/patch.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/vdom/patch.js b/src/core/vdom/patch.js index 4939811562f..9f13f621c50 100644 --- a/src/core/vdom/patch.js +++ b/src/core/vdom/patch.js @@ -406,7 +406,6 @@ export function createPatchFunction (backend) { : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx) if (isUndef(idxInOld)) { // New element createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm) - newStartVnode = newCh[++newStartIdx] } else { elmToMove = oldCh[idxInOld] /* istanbul ignore if */ @@ -420,13 +419,12 @@ export function createPatchFunction (backend) { patchVnode(elmToMove, newStartVnode, insertedVnodeQueue) oldCh[idxInOld] = undefined canMove && nodeOps.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm) - newStartVnode = newCh[++newStartIdx] } else { // same key but different element. treat as new element createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm) - newStartVnode = newCh[++newStartIdx] } } + newStartVnode = newCh[++newStartIdx] } } if (oldStartIdx > oldEndIdx) {