Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/internal/hooks/use-mobile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function getIsMobile() {
* wouldn't know which one of them to use).
* Instead, we use the media query here in JS too.
*/
return window.matchMedia(`(max-width: ${mobileBreakpoint}px)`).matches;
/* istanbul ignore next: matchMedia is not available in jsdom. */
return window.matchMedia(`(max-width: ${mobileBreakpoint}px)`)?.matches;
}

return getMatchingBreakpoint(window.innerWidth, ['xs']) !== 'xs';
Expand Down
Loading