fix: lowercase entire lang
This commit is contained in:
@@ -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.
|
* Helper function to convert API's (e.g. the Hotel endpoint) capitalized values to Lang enum.
|
||||||
*/
|
*/
|
||||||
export function fromUppercaseToLangEnum(lang: string): Lang | undefined {
|
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)
|
return Object.values(Lang).find((l) => l === lowerCaseLang)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user