Merge pull request #546 from zymfe/merge-statement

chore: merge statement
pull/541/head
Simon Friis Vindum 5 years ago committed by GitHub
commit 9f55486f42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -233,7 +233,6 @@ export function init (modules: Array<Partial<Module>>, domApi?: DOMAPI) {
idxInOld = oldKeyToIdx[newStartVnode.key as string];
if (isUndef(idxInOld)) { // New element
api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm!);
newStartVnode = newCh[++newStartIdx];
} else {
elmToMove = oldCh[idxInOld];
if (elmToMove.sel !== newStartVnode.sel) {
@ -243,8 +242,8 @@ export function init (modules: Array<Partial<Module>>, domApi?: DOMAPI) {
oldCh[idxInOld] = undefined as any;
api.insertBefore(parentElm, elmToMove.elm!, oldStartVnode.elm!);
}
newStartVnode = newCh[++newStartIdx];
}
newStartVnode = newCh[++newStartIdx];
}
}
if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) {

Loading…
Cancel
Save