Skip to content

Commit

Permalink
fix OS format function to properly show iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Nov 13, 2023
1 parent dc95d8b commit 0eefc12
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/common.js
Original file line number Diff line number Diff line change
@@ -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;
};

Expand Down

0 comments on commit 0eefc12

Please sign in to comment.