Don't die if script has been removed from document

This commit is contained in:
Hubert Chathi 2016-02-22 11:42:04 -05:00
parent e213c8454c
commit 6e7530d253

View File

@ -2380,7 +2380,7 @@ MathJax.Hub = {
//
var node = document.getElementById(error.id);
if (node) node.parentNode.removeChild(node);
script.parentNode.insertBefore(error,script);
if (script.parentNode) script.parentNode.insertBefore(error,script);
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
//
// Save the error for debugging purposes