mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
Add Null Check On diskAccount (#10550)
This commit is contained in:
@@ -117,6 +117,13 @@ export class StateService<
|
|||||||
state.accounts = {};
|
state.accounts = {};
|
||||||
}
|
}
|
||||||
state.accounts[userId] = this.createAccount();
|
state.accounts[userId] = this.createAccount();
|
||||||
|
|
||||||
|
if (diskAccount == null) {
|
||||||
|
// Return early because we can't set the diskAccount.profile
|
||||||
|
// if diskAccount itself is null
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
state.accounts[userId].profile = diskAccount.profile;
|
state.accounts[userId].profile = diskAccount.profile;
|
||||||
return state;
|
return state;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user