We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1e866f commit 5b7ea58Copy full SHA for 5b7ea58
2 files changed
src/hooks/useMediaQuery.js
@@ -10,7 +10,7 @@ const useMediaQuery = query => {
10
11
React.useEffect(() => {
12
13
- const list = window.matchMedia(query)
+ const list = globalThis.matchMedia(query)
14
const handleChange = ({ matches }) => setHasMatch(matches)
15
16
handleChange(list)
src/lib/intersectionObserver.js
@@ -102,4 +102,4 @@ const Mock = class IntersectionObserver {
102
}
103
104
105
-export default window?.IntersectionObserver ?? Mock
+export default globalThis.IntersectionObserver ?? Mock
0 commit comments