Skip to content

Commit

Permalink
keep reference to nextSibling during hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Apr 14, 2017
1 parent 7774cc6 commit 99ac4c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,10 @@
var currentChildNode = node.firstChild;
var vchild = vnode.children[i];
while (vchild !== undefined || currentChildNode !== null) {
var next = currentChildNode ? currentChildNode.nextSibling : null;
hydrate(currentChildNode, vchild, node, instance);
vchild = vnode.children[++i];
currentChildNode = currentChildNode ? currentChildNode.nextSibling : null;
currentChildNode = next;
}

return node;
Expand Down
Loading

0 comments on commit 99ac4c8

Please sign in to comment.