We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1418e3 commit 091015bCopy full SHA for 091015b
web/src/redux/actions/settings.ts
@@ -25,7 +25,7 @@ export const changeLanguage = (languageCode: Language["code"]) => {
25
26
// remove code from url if it's the default language
27
if (language.code === Languages[0].code) {
28
- newPath = newPath.replace(`/${language.code}`, "");
+ newPath = newPath.replace(new RegExp(`^/${language.code}`), "");
29
}
30
31
window.location.assign(newPath);
0 commit comments