fix urls with base

This commit is contained in:
vcoppe
2024-07-08 23:39:45 +02:00
parent 04447f4034
commit 13a997e272
2 changed files with 2 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ export const brouterProfiles: { [key: string]: string } = {
railway: 'rail'
};
export const routingProfileSelectItem = writable({
value: '',
value: 'bike',
label: ''
});

View File

@@ -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';