Skip to content

Commit

Permalink
Fix order of new node append in keys patch
Browse files Browse the repository at this point in the history
  • Loading branch information
dmjio committed Aug 25, 2018
1 parent 48109ec commit 995d8d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsbits/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ window.syncChildren = function syncChildren(os, ns, parent, doc) {
diff(null, nFirst, parent, doc);
/* insertBefore's semantics will append a node if the second argument provided is `null` or `undefined`.
Otherwise, it will insert node.domRef before oLast.domRef. */
parent.insertBefore(nFirst.domRef, oLast.domRef);
parent.insertBefore(oLast.domRef, nFirst.domRef);
os.splice(newFirstIndex, 0, nFirst);
newFirstIndex++;
}
Expand Down

1 comment on commit 995d8d2

@dmjio
Copy link
Owner Author

@dmjio dmjio commented on 995d8d2 Aug 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.