1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-05 01:53:13 +00:00

[bug] Null check in memory account before claiming it has a userId

This commit is contained in:
addison
2021-11-16 10:11:35 -05:00
parent 649cfe517e
commit 76577c4507

View File

@@ -1233,7 +1233,7 @@ export class StateService implements StateServiceAbstraction {
private getUserIdFromMemory(options: StorageOptions): string {
return options?.userId != null ?
this.state.accounts[options.userId].userId :
this.state.accounts[options.userId]?.userId :
this.state.activeUserId;
}