diff --git a/mithril.js b/mithril.js index 27b41612..a478c1cd 100644 --- a/mithril.js +++ b/mithril.js @@ -1240,8 +1240,8 @@ var coreRenderer = function($window) { var namespace = dom.namespaceURI // First time rendering0 into a node clears it out if (dom.vnodes == null) dom.textContent = "" - if (!Array.isArray(vnodes)) vnodes = [vnodes] - updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace) + vnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes]) + updateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace) dom.vnodes = vnodes // document.activeElement can return null in IE https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement if (active != null && $doc.activeElement !== active && typeof active.focus === "function") active.focus() diff --git a/mithril.min.js b/mithril.min.js index db78ff6d..9c23112e 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -35,7 +35,7 @@ b.slice(6),d):"style"===b?T(a.dom,c,d):S(a,b,e)?"value"===b&&(("input"===a.tag|| a||"onbeforeremove"===a||"onbeforeupdate"===a}function S(a,b,c){return void 0===c&&(-1