diff --git a/constants/languages.ts b/constants/languages.ts index 93f407d7c..085666204 100644 --- a/constants/languages.ts +++ b/constants/languages.ts @@ -77,7 +77,7 @@ export function findLang(pathname: string) { * Helper function to convert API's (e.g. the Hotel endpoint) capitalized values to Lang enum. */ export function fromUppercaseToLangEnum(lang: string): Lang | undefined { - const lowerCaseLang = lang.charAt(0).toLowerCase() + lang.slice(1) + const lowerCaseLang = lang.toLowerCase() return Object.values(Lang).find((l) => l === lowerCaseLang) }