Skip to content

Commit

Permalink
[code:snabbdom] fix updateChildren error
Browse files Browse the repository at this point in the history
  • Loading branch information
creeperyang committed Jul 30, 2017
1 parent 4077b52 commit a3c345d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codes/snabbdom/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export default function init(modules = [], domApi) {
else if (isSameVnode(oldEndVnode, newStartVnode)) {
patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue)
// 这里是左移更新后的 dom,原因参考上面的右移。
api.insertBefore(parentElm, oldEndVnode.elm, api.nextSibling(oldStartVnode.elm))
api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm)
oldEndVnode = oldCh[--oldEndIdx]
newStartVnode = newCh[++newStartIdx]
}
Expand Down

0 comments on commit a3c345d

Please sign in to comment.