Skip to content

Commit

Permalink
chore: update heuristic for canUseDOM
Browse files Browse the repository at this point in the history
  • Loading branch information
staylor committed Nov 20, 2023
1 parent 6435fc0 commit 867ea57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-helmet-async",
"version": "2.0.1-alpha",
"version": "2.0.0-beta",
"description": "Thread-safe Helmet for React 16+ and friends",
"sideEffects": false,
"main": "./lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/HelmetData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface HelmetDataContext {

export default class HelmetData implements HelmetDataType {
instances = [];
canUseDOM = typeof document !== 'undefined';
canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
context: HelmetDataContext;

value = {
Expand Down

0 comments on commit 867ea57

Please sign in to comment.