Fix RVO redirect URL for locale
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
3027c69fa8
commit
b2fe8f3bd7
@ -63,7 +63,10 @@ export class AppCommonEffects {
|
||||
ofType(appCommonActions.SWITCHLANGUAGE),
|
||||
switchMap((action) => {
|
||||
const a = action as appCommonActions.SwitchLanguage;
|
||||
location.replace(`/${a.locale}/`);
|
||||
if (location.pathname.includes(`/${this.locale}/`)) {
|
||||
const newPath = location.pathname.replace(`/${this.locale}/`, `/${a.locale}/`);
|
||||
location.replace(newPath);
|
||||
}
|
||||
return of(undefined);
|
||||
})),{ dispatch:false});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user