1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-26 05:03:41 +00:00

Fix sends always coming back as empty in browser

This commit is contained in:
Robyn MacCallum
2021-11-17 16:36:57 -05:00
parent 8ddf164e13
commit 4177ca33c3

View File

@@ -96,11 +96,12 @@ export class SendService implements SendServiceAbstraction {
}
async getAllDecrypted(): Promise<SendView[]> {
const decSends = await this.stateService.getDecryptedSends() ?? [];
let decSends = await this.stateService.getDecryptedSends();
if (decSends != null) {
return decSends;
}
decSends = [];
const hasKey = await this.cryptoService.hasKey();
if (!hasKey) {
throw new Error('No key.');