Merge pull request #1396 from uhoreg/check-script-parentnode

Don't die if script has been removed from document
This commit is contained in:
Davide P. Cervone 2016-03-20 09:11:39 -04:00
commit 11cd99bd7c

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