fix tests

This commit is contained in:
Ryan Di
2025-07-23 19:09:12 +10:00
parent 358f687b4f
commit 7f0b97a163

View File

@ -2400,7 +2400,8 @@ class App extends React.Component<AppProps, AppState> {
private isMobileOrTablet = (): boolean => {
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
const hasCoarsePointer = window.matchMedia("(pointer: coarse)").matches;
const hasCoarsePointer =
"matchMedia" in window && window.matchMedia("(pointer: coarse)").matches;
const isTouchMobile = hasTouch && hasCoarsePointer;
return isMobile || isTouchMobile;