mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-05 01:42:54 +00:00
fix urls with base
This commit is contained in:
@@ -95,7 +95,7 @@ export function setCrosshairCursor() {
|
||||
}
|
||||
|
||||
export function getURLForLanguage(lang: string | null | undefined, path?: string): string {
|
||||
let newPath = path ?? (browser ? window.location.pathname : '');
|
||||
let newPath = path ?? (browser ? window.location.pathname.replace(base, '') : '');
|
||||
let languageInPath = newPath.split('/')[1];
|
||||
if (!languages.hasOwnProperty(languageInPath)) {
|
||||
languageInPath = 'en';
|
||||
|
Reference in New Issue
Block a user