Skip to content
Snippets Groups Projects
Commit 16100dae authored by William Arsac's avatar William Arsac
Browse files

feat: fix log-out failing in error

parent ecc1937d
No related branches found
No related tags found
No related merge requests found
......@@ -541,15 +541,17 @@ export class AppState extends BasicState<AppStateModel> {
// Logout client side
this.oauthService.logOut(true);
}),
mergeMap(() => ctx.dispatch(new Navigate([RoutesEnum.homePage])),
tap(() => {
ctx.patchState({
ignorePreventLeavePopup: false,
});
if (isTrue(environment.reloadAfterLogout)) {
window.location.reload();
}
}),
mergeMap(
() => ctx.dispatch(new Navigate([RoutesEnum.homePage])).pipe(
tap(() => {
ctx.patchState({
ignorePreventLeavePopup: false,
});
if (isTrue(environment.reloadAfterLogout)) {
window.location.reload();
}
}),
),
),
catchError(err => {
ctx.dispatch(new Navigate([RoutesEnum.homePage]));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment