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