mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
[PM-12007] Fix vault timeout action logout with account switching (#11008)
* Protect Against Toast Error * Use `concatMap` Instead of `switchMap`
This commit is contained in:
@@ -247,7 +247,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
// Displaying toasts isn't super useful on the popup due to the reloads we do.
|
||||
// However, it is visible for a moment on the FF sidebar logout.
|
||||
private async displayLogoutReason(logoutReason: LogoutReason) {
|
||||
let toastOptions: ToastOptions;
|
||||
let toastOptions: ToastOptions | null = null;
|
||||
switch (logoutReason) {
|
||||
case "invalidSecurityStamp":
|
||||
case "sessionExpired": {
|
||||
@@ -260,6 +260,11 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
if (toastOptions == null) {
|
||||
// We don't have anything to show for this particular reason
|
||||
return;
|
||||
}
|
||||
|
||||
this.toastService.showToast(toastOptions);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user