Skip to content

Commit

Permalink
Merge pull request #848 from ssi02014/fix/purify
Browse files Browse the repository at this point in the history
fix(purify): Remove unnecessary conditional expressions
  • Loading branch information
cure53 authored Aug 9, 2023
2 parents d5060b3 + 68ad9a9 commit 59c7807
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 10 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.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.es.js.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: 0 additions & 2 deletions src/purify.js
Original file line number Diff line number Diff line change
Expand Up @@ -1000,8 +1000,6 @@ function createDOMPurify(window = getGlobal()) {
if (
currentNode.hasChildNodes() &&
!_isNode(currentNode.firstElementChild) &&
(!_isNode(currentNode.content) ||
!_isNode(currentNode.content.firstElementChild)) &&
regExpTest(/<[/\w]/g, currentNode.innerHTML) &&
regExpTest(/<[/\w]/g, currentNode.textContent)
) {
Expand Down

0 comments on commit 59c7807

Please sign in to comment.