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 ac36923 commit 7b08dfeCopy full SHA for 7b08dfe
web/src/apps/main/redux/reducers/settings/index.ts
@@ -42,12 +42,11 @@ export const settings = (
42
action.payload.language.code === "en" ? "" : `/${action.payload.language.code}`;
43
44
if (match?.params.lang || langPrefix) {
45
- history.push({
46
- ...history.location,
47
- pathname: match?.params.lang
+ const pathname =
+ (match?.params.lang
48
? history.location.pathname.replace(`/${match.params.lang}`, langPrefix)
49
- : `${langPrefix}${history.location.pathname}`,
50
- });
+ : `${langPrefix}${history.location.pathname}`) || "/";
+ history.push({ ...history.location, pathname });
51
}
52
53
return { ...state, ...action.payload };
0 commit comments