Fix SSR matchMedia shim

This commit is contained in:
Mononaut committed 2024-03-22 05:35:19 +00:00
1 parent a2b9b0c89d
commit cfdbd93695
2 files changed
+4 -3

No files matched your search

@@ -323,7 +323,7 @@ export function hasTouchScreen(): boolean {
// @ts-ignore
hasTouchScreen = navigator.msMaxTouchPoints > 0;
} else {
const mQ = matchMedia?.('(pointer:coarse)');
const mQ = window.matchMedia?.('(pointer:coarse)');
if (mQ?.media === '(pointer:coarse)') {
hasTouchScreen = !!mQ.matches;
} else if ('orientation' in window) {