From 6b1e6876c623981d44b7bcb4f31aec78b81610bb Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Thu, 19 Mar 2026 11:32:36 +0100 Subject: [PATCH] fix: preserve intentional OS name casing (macOS, iOS, webOS) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip capitalize() for names with mixed casing to prevent macOS→MacOS, iOS→IOS, webOS→WebOS, ChromeOS→Chromeos etc. --- components/dashboard/TechSpecs.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/dashboard/TechSpecs.tsx b/components/dashboard/TechSpecs.tsx index bd39109..6139ec9 100644 --- a/components/dashboard/TechSpecs.tsx +++ b/components/dashboard/TechSpecs.tsx @@ -30,6 +30,8 @@ type Tab = 'browsers' | 'os' | 'devices' | 'screens' function capitalize(s: string): string { if (!s) return s + // Preserve intentional casing (e.g. macOS, iOS, webOS, ChromeOS, FreeBSD) + if (s !== s.toLowerCase() && s !== s.toUpperCase()) return s return s.charAt(0).toUpperCase() + s.slice(1) }