fix tests

This commit is contained in:
Ryan Di
2025-07-28 18:59:28 +10:00
parent b562121a98
commit 19048ca999
2 changed files with 3 additions and 4 deletions

View File

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

View File

@@ -1174,9 +1174,7 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e
},
"suggestedBindings": [],
"theme": "light",
"toast": {
"message": "Added to library",
},
"toast": null,
"userToFollow": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,