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 12de85f commit 4af1cfbCopy full SHA for 4af1cfb
src/internal/hooks/use-mobile/index.ts
@@ -26,7 +26,8 @@ function getIsMobile() {
26
* wouldn't know which one of them to use).
27
* Instead, we use the media query here in JS too.
28
*/
29
- return window.matchMedia(`(max-width: ${mobileBreakpoint}px)`).matches;
+ /* istanbul ignore next: matchMedia is not available in jsdom. */
30
+ return window.matchMedia(`(max-width: ${mobileBreakpoint}px)`)?.matches;
31
}
32
33
return getMatchingBreakpoint(window.innerWidth, ['xs']) !== 'xs';
0 commit comments