We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31c998a commit 69d62e4Copy full SHA for 69d62e4
src/hooks/useSelector.js
@@ -20,7 +20,11 @@ import { ReactReduxContext } from '../components/Context'
20
// is created synchronously, otherwise a store update may occur before the
21
// subscription is created and an inconsistent state may be observed
22
const useIsomorphicLayoutEffect =
23
- typeof window !== 'undefined' ? useLayoutEffect : useEffect
+ typeof window !== 'undefined' &&
24
+ typeof window.document !== 'undefined' &&
25
+ typeof window.document.createElement !== 'undefined'
26
+ ? useLayoutEffect
27
+ : useEffect
28
29
const refEquality = (a, b) => a === b
30
0 commit comments