diff --git a/mithril.js b/mithril.js index 869c114d..e3a9d1c7 100644 --- a/mithril.js +++ b/mithril.js @@ -363,7 +363,7 @@ var m = (function app(window, undefined) { clear(cached.nodes, cached); nodes = [$document.createTextNode(data)] } - parentElement.insertBefore(nodes[0], parentElement.childNodes[index] || null); + try {parentElement.insertBefore(nodes[0], parentElement.childNodes[index] || null);} catch (e) {} //IE erroneously throws error when appending an empty text node after a null nodes[0].nodeValue = data } }