diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-04-14 03:15:03 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-04-14 03:15:03 -0700 |
| commit | 00deaf24ef1c9e5d75b65638eb8c7c6bc8f09955 (patch) | |
| tree | d3b983990904fa91bcfe256ee3916bd494b82740 /site/src/utils.ts | |
| parent | 073fc8fe92e60fd4662580e8216600379a0edfae (diff) | |
fix: make gameId lowercase before checking
Diffstat (limited to 'site/src/utils.ts')
| -rw-r--r-- | site/src/utils.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/site/src/utils.ts b/site/src/utils.ts index e523f5c..270b5a2 100644 --- a/site/src/utils.ts +++ b/site/src/utils.ts @@ -1,10 +1,12 @@ export const getGameTitle = (gameId: string) => { if (!gameId) return null; - if (gameId.startsWith("sdvx")) return "SOUND VOLTEX"; - if (gameId.startsWith("iidx")) return "beatmania IIDX"; - if (gameId.startsWith("chunithm_jp")) return "CHUNITHM (JAPAN)"; - if (gameId.startsWith("maimaidx_jp")) return "maimai DX (JAPAN)"; + const lowerCaseGameId = gameId.toLowerCase(); + + if (lowerCaseGameId.startsWith("sdvx")) return "SOUND VOLTEX"; + if (lowerCaseGameId.startsWith("iidx")) return "beatmania IIDX"; + if (lowerCaseGameId.startsWith("chunithm_jp")) return "CHUNITHM (JAPAN)"; + if (lowerCaseGameId.startsWith("maimaidx_jp")) return "maimai DX (JAPAN)"; return gameId.toUpperCase(); }; |
