prevent nonsensical IE error

This commit is contained in:
Leo Horie 2015-06-09 16:27:57 -05:00
parent e6d6db6123
commit c57b0b4047

View file

@ -364,9 +364,12 @@ var m = (function app(window, undefined) {
clear(cached.nodes, cached); clear(cached.nodes, cached);
nodes = [$document.createTextNode(data)] nodes = [$document.createTextNode(data)]
} }
try {parentElement.insertBefore(nodes[0], parentElement.childNodes[index] || null);} catch (e) {} //IE erroneously throws error when appending an empty text node after a null try {
parentElement.insertBefore(nodes[0], parentElement.childNodes[index] || null);
nodes[0].nodeValue = data nodes[0].nodeValue = data
} }
catch (e) {} //IE erroneously throws error when appending an empty text node after a null
}
} }
} }
cached = new data.constructor(data); cached = new data.constructor(data);