mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 16:52:31 +00:00
fix urls with base
This commit is contained in:
@@ -17,7 +17,7 @@ export const brouterProfiles: { [key: string]: string } = {
|
|||||||
railway: 'rail'
|
railway: 'rail'
|
||||||
};
|
};
|
||||||
export const routingProfileSelectItem = writable({
|
export const routingProfileSelectItem = writable({
|
||||||
value: '',
|
value: 'bike',
|
||||||
label: ''
|
label: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -95,7 +95,7 @@ export function setCrosshairCursor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getURLForLanguage(lang: string | null | undefined, path?: string): string {
|
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];
|
let languageInPath = newPath.split('/')[1];
|
||||||
if (!languages.hasOwnProperty(languageInPath)) {
|
if (!languages.hasOwnProperty(languageInPath)) {
|
||||||
languageInPath = 'en';
|
languageInPath = 'en';
|
||||||
|
Reference in New Issue
Block a user