Skip to content

Commit 1b5d909

Browse files
fix: remove explicit any from navigator
1 parent f62a9d1 commit 1b5d909

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

imagelab-frontend/src/components/Layout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ function loadStoredBool(key: string): boolean {
4949
const isMac =
5050
typeof navigator !== "undefined" &&
5151
/mac/i.test(
52-
(navigator as any).userAgentData?.platform ?? navigator.userAgent
52+
(
53+
navigator as Navigator & {
54+
userAgentData?: { platform?: string };
55+
}
56+
).userAgentData?.platform ?? navigator.userAgent
5357
);
5458
const modShift = isMac ? "⌘⇧" : "Ctrl+Shift+";
5559

imagelab-frontend/src/components/Toolbar.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ interface ToolbarProps {
1616
const isMac =
1717
typeof navigator !== "undefined" &&
1818
/mac/i.test(
19-
(navigator as any).userAgentData?.platform ?? navigator.userAgent
19+
(
20+
navigator as Navigator & {
21+
userAgentData?: { platform?: string };
22+
}
23+
).userAgentData?.platform ?? navigator.userAgent
2024
);
2125
const mod = isMac ? "⌘" : "Ctrl+";
2226
const modShift = isMac ? "⌘⇧" : "Ctrl+Shift+";

0 commit comments

Comments
 (0)