From 31975983c3cfa11f57459293faaf333ca3576bc8 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Sat, 16 Nov 2024 15:40:01 -0800 Subject: [PATCH] Fix macOS detect for docsite (#1314) --- docs/src/components/platformcontext.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/components/platformcontext.tsx b/docs/src/components/platformcontext.tsx index 1bda2fc01..ee82190b4 100644 --- a/docs/src/components/platformcontext.tsx +++ b/docs/src/components/platformcontext.tsx @@ -16,14 +16,14 @@ export const PlatformContext = createContext(u const detectPlatform = (): Platform => { const savedPlatform = localStorage.getItem("platform") as Platform | null; - if (savedPlatform && (savedPlatform === "mac" || savedPlatform === "linux")) { + if (savedPlatform) { return savedPlatform; } const { os } = UAParser(navigator.userAgent); if (/Windows/.test(os.name)) { return "windows"; - } else if (/macOS|iOS/.test(os.name)) { + } else if (/Mac OS|iOS/.test(os.name)) { return "mac"; } else { return "linux";