mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-01 08:12:32 +00:00
fix urls with base
This commit is contained in:
@@ -17,7 +17,7 @@ export const brouterProfiles: { [key: string]: string } = {
|
||||
railway: 'rail'
|
||||
};
|
||||
export const routingProfileSelectItem = writable({
|
||||
value: '',
|
||||
value: 'bike',
|
||||
label: ''
|
||||
});
|
||||
|
||||
|
@@ -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