Skip to content

Commit

Permalink
refactor: remove repeat line in patch.js (vuejs#6269)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
superwf authored and hefeng committed Jan 25, 2019
1 parent 99e15ba commit 55369e8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/vdom/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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) {
Expand Down

0 comments on commit 55369e8

Please sign in to comment.