diff --git a/packages/shared/ExecutionEnvironment.js b/packages/shared/ExecutionEnvironment.js index 9554c8d6464cf..2e7af6edd2d6c 100644 --- a/packages/shared/ExecutionEnvironment.js +++ b/packages/shared/ExecutionEnvironment.js @@ -9,6 +9,6 @@ export const canUseDOM: boolean = !!( typeof window !== 'undefined' && - window.document && - window.document.createElement + typeof window.document !== 'undefined' && + typeof window.document.createElement !== 'undefined' );