i18n: fix auto match wrong region
All checks were successful
/ depoly (push) Successful in 1m16s

This commit is contained in:
thislight 2024-11-19 18:07:11 +08:00
parent 8d24ffec29
commit 5f504024a3
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -58,7 +58,7 @@ export function autoMatchRegion() {
} }
} }
} else if (s.length === 2) { } else if (s.length === 2) {
const [lang, region] = s[1]; const [lang, region] = s;
for (const available of SUPPORTED_REGIONS) { for (const available of SUPPORTED_REGIONS) {
if (available.toLowerCase() === `${lang}_${region}`.toLowerCase()) { if (available.toLowerCase() === `${lang}_${region}`.toLowerCase()) {
return available; return available;