From 995d8d2640b46664b0ca0af5f836d70c03dee0e1 Mon Sep 17 00:00:00 2001 From: David Johnson Date: Sat, 25 Aug 2018 12:54:34 -0400 Subject: [PATCH] Fix order of new node append in keys patch --- jsbits/diff.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsbits/diff.js b/jsbits/diff.js index 75101d6d..b77573ea 100644 --- a/jsbits/diff.js +++ b/jsbits/diff.js @@ -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++; }