Compare commits

...

1 Commits

Author SHA1 Message Date
Udit Takkar c7106e9075 fix: RangeError: Incorrect locale information 2023-10-13 23:06:09 +05:30
1 changed files with 1 additions and 1 deletions

View File

@ -29,5 +29,5 @@ export const getLocale = async (req: GetTokenParams["req"]): Promise<string> =>
const languages = acceptLanguage ? parse(acceptLanguage) : [];
return languages[0]?.code || "en";
return languages.length === 1 && languages[0].code === "*" ? "en" : languages[0]?.code ?? "en";
};