fix home link for languages other than english

This commit is contained in:
vcoppe
2025-01-03 18:23:48 +01:00
parent de38fea917
commit 93d5211d27

View File

@@ -189,6 +189,10 @@ export function isSafari() {
export function getURLForLanguage(lang: string | null | undefined, path: string): string {
let newPath = path.replace(base, '');
if (newPath === '/') {
newPath = '';
}
let languageInPath = newPath.split('/')[1];
if (!languages.hasOwnProperty(languageInPath)) {
languageInPath = 'en';