Skip to content

Commit

Permalink
chore: update client side check to use window
Browse files Browse the repository at this point in the history
  • Loading branch information
BohdanYavorskyi committed Dec 21, 2023
1 parent e2141f1 commit 0448e3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js

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

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function initDOMPurifyWithJSDOM() {
}

function resolveDOMPurify() {
const isClientSide = typeof process === 'undefined';
const isClientSide = typeof window !== 'undefined';
return isClientSide ? importModule(require('dompurify')) : initDOMPurifyWithJSDOM();
}

Expand Down

0 comments on commit 0448e3d

Please sign in to comment.