Skip to content

Commit

Permalink
Attempt at fixing memory leak related to foreignObjects and nested SVG
Browse files Browse the repository at this point in the history
elements.
  • Loading branch information
Edward Turpin authored and Edward Turpin committed Aug 23, 2021
1 parent b365287 commit 22e1017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ setInterval(function () {
for (var key in hub) if (hub[has](key)) {
var el = hub[key],
node = el.node;
if (el.type != "svg" && !node.ownerSVGElement || el.type == "svg" && (!node.parentNode || "ownerSVGElement" in node.parentNode && !node.ownerSVGElement)) {
if (!node.isConnected) {
delete hub[key];
}
}
Expand Down

0 comments on commit 22e1017

Please sign in to comment.