mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-12 16:54:26 +01:00
fix: calling toLowerCase on potentially undefined navigator.* values (#9901)
This commit is contained in:
@@ -28,11 +28,9 @@ export const isBrave = () =>
|
|||||||
export const isMobile =
|
export const isMobile =
|
||||||
isIOS ||
|
isIOS ||
|
||||||
/android|webos|ipod|blackberry|iemobile|opera mini/i.test(
|
/android|webos|ipod|blackberry|iemobile|opera mini/i.test(
|
||||||
navigator.userAgent.toLowerCase(),
|
navigator.userAgent,
|
||||||
) ||
|
) ||
|
||||||
/android|ios|ipod|blackberry|windows phone/i.test(
|
/android|ios|ipod|blackberry|windows phone/i.test(navigator.platform);
|
||||||
navigator.platform.toLowerCase(),
|
|
||||||
);
|
|
||||||
|
|
||||||
export const supportsResizeObserver =
|
export const supportsResizeObserver =
|
||||||
typeof window !== "undefined" && "ResizeObserver" in window;
|
typeof window !== "undefined" && "ResizeObserver" in window;
|
||||||
|
|||||||
Reference in New Issue
Block a user