mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-17 08:42:28 +00:00
fix home link for languages other than english
This commit is contained in:
1 parent
de38fea917
commit
93d5211d27
1 file changed
+4
@@ -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