From 0eefc122bbef1cbbfaf608e9be325783d91f3e5e Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Mon, 13 Nov 2023 22:09:32 +0800 Subject: [PATCH] fix OS format function to properly show iOS --- src/utils/common.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/common.js b/src/utils/common.js index 9ff30e13..538fb7e8 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -1,15 +1,15 @@ export const formatOS = (os) => { - if (os.startsWith("windows 10")) { - return "Windows 10"; - } - if (os.startsWith("Darwin")) { return os.replace("Darwin", "MacOS"); } - // capitalize first letter - os = os.charAt(0).toUpperCase() + os.slice(1); + + if (!os.startsWith("iOS")) { + // capitalize first letter + os = os.charAt(0).toUpperCase() + os.slice(1); + } + return os; };