Forráskód Böngészése

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
superwf 8 éve
szülő
commit
1b96ba7019
1 módosított fájl, 1 hozzáadás és 3 törlés
  1. 1 3
      src/core/vdom/patch.js

+ 1 - 3
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) {