diff --git a/api/tests/test-mount.js b/api/tests/test-mount.js index 590dd98a0..5bc39e5fa 100644 --- a/api/tests/test-mount.js +++ b/api/tests/test-mount.js @@ -124,32 +124,4 @@ o.spec("mount", function() { done() }, FRAME_BUDGET) }) - - o("updates when new mounts are instantiated", function(done) { - var onupdate = o.spy() - - render(root, [ - m("div[id=a]"), - m("div[id=b]") - ]) - - mount(root.childNodes[0], { - view : function() { - return m("div", { - onupdate : onupdate - }) - } - }) - - mount(root.childNodes[1], { - view : function() { - return m("div", { - oncreate : function(){ - o(onupdate.callCount).equals(1) - done() - } - }) - } - }) - }) }) diff --git a/render/render.js b/render/render.js index 641975aa5..eeffb3e18 100644 --- a/render/render.js +++ b/render/render.js @@ -176,7 +176,7 @@ module.exports = function($window) { } if (end < start) break } - createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, undefined) + createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns) removeNodes(parent, old, oldStart, oldEnd + 1, vnodes) } } @@ -518,8 +518,8 @@ module.exports = function($window) { if (!(vnodes instanceof Array)) vnodes = [vnodes] updateNodes(dom, dom.vnodes, Node.normalizeChildren(vnodes), hooks, null, undefined) - for (var i = 0; i < hooks.length; i++) hooks[i]() dom.vnodes = vnodes + for (var i = 0; i < hooks.length; i++) hooks[i]() if ($doc.activeElement !== active) active.focus() }