mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-30 14:31:47 +00:00
fix issue where a script element removes itself from the DOM on evaluation (apparently eCharts does this)
This commit is contained in:
parent
63b6dc018a
commit
a96163830d
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user