fix issue where a script element removes itself from the DOM on evaluation (apparently eCharts does this)

This commit is contained in:
Carson Gross 2022-12-01 08:03:47 -07:00
parent 63b6dc018a
commit a96163830d

View File

@ -1741,7 +1741,10 @@ return (function () {
} catch (e) {
logError(e);
} finally {
parent.removeChild(script);
// remove old script element, but only if it is still in DOM
if (script.parentElement) {
script.parentElement.removeChild(script);
}
}
}
}