Skip to content

Commit

Permalink
fix: Fixed a DOM clobbering issue leading to an error being thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
cure53 committed Jul 4, 2024
1 parent f8c2ef5 commit 00fc06c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/purify.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.es.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ function createDOMPurify() {
});
try {
// eslint-disable-next-line unicorn/prefer-dom-node-remove
node.parentNode.removeChild(node);
getParentNode(node).removeChild(node);
} catch (_) {
node.remove();
}
Expand Down
2 changes: 1 addition & 1 deletion dist/purify.es.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/purify.js
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ function createDOMPurify(window = getGlobal()) {

try {
// eslint-disable-next-line unicorn/prefer-dom-node-remove
node.parentNode.removeChild(node);
getParentNode(node).removeChild(node);
} catch (_) {
node.remove();
}
Expand Down

0 comments on commit 00fc06c

Please sign in to comment.