1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-22 19:23:24 +00:00

[bug] Grab account from normal storage if secure storage is requested but does not exist

This commit is contained in:
addison
2021-11-16 12:41:53 -05:00
parent 1cec8100c3
commit 420c4184e9

View File

@@ -1243,7 +1243,8 @@ export class StateService implements StateServiceAbstraction {
}
const state = options?.useSecureStorage ?
await this.secureStorageService.get<State>('state', options) :
await this.secureStorageService.get<State>('state', options) ??
await this.storageService.get<State>('state', this.reconcileOptions(options, { htmlStorageLocation: HtmlStorageLocation.Local })) :
await this.storageService.get<State>('state', options);
return state?.accounts[options?.userId ?? this.state.activeUserId];