mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-25 12:15:18 +01:00
Validate an active user exists (#6695)
This commit is contained in:
parent
e49f298330
commit
204f7631b4
@ -175,7 +175,7 @@ export class StateService<
|
|||||||
// TODO: Temporary update to avoid routing all account status changes through account service for now.
|
// TODO: Temporary update to avoid routing all account status changes through account service for now.
|
||||||
// account service tracks logged out accounts, but State service does not, so we need to add the active account
|
// account service tracks logged out accounts, but State service does not, so we need to add the active account
|
||||||
// if it's not in the accounts list.
|
// if it's not in the accounts list.
|
||||||
if (this.accountsSubject.value[state.activeUserId] == null) {
|
if (state.activeUserId != null && this.accountsSubject.value[state.activeUserId] == null) {
|
||||||
const activeDiskAccount = await this.getAccountFromDisk({ userId: state.activeUserId });
|
const activeDiskAccount = await this.getAccountFromDisk({ userId: state.activeUserId });
|
||||||
this.accountService.addAccount(state.activeUserId as UserId, {
|
this.accountService.addAccount(state.activeUserId as UserId, {
|
||||||
name: activeDiskAccount.profile.name,
|
name: activeDiskAccount.profile.name,
|
||||||
|
Loading…
Reference in New Issue
Block a user