mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 15:43:25 +00:00
fix home link for languages other than english
This commit is contained in:
@@ -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';
|
||||
|
Reference in New Issue
Block a user