Skip to content

Commit

Permalink
Merge pull request #239 from BohdanYavorskyi/chore/update-client-side…
Browse files Browse the repository at this point in the history
…-check

Change a way we distinguish client from server
  • Loading branch information
kkomelin authored Dec 23, 2023
2 parents e2141f1 + 0448e3d commit e0ef976
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 e0ef976

Please sign in to comment.