1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-4660] Check size of orgKeys map instead of against null (#6776)

* Check size of orgKeys map for nullness

* Add null check on orgKeys
This commit is contained in:
Robyn MacCallum
2023-11-02 19:28:13 -04:00
committed by GitHub
parent c8bc7c62e9
commit 90e2779fab

View File

@@ -293,7 +293,7 @@ export class CipherService implements CipherServiceAbstraction {
const ciphers = await this.getAll();
const orgKeys = await this.cryptoService.getOrgKeys();
const userKey = await this.cryptoService.getUserKeyWithLegacySupport();
if (orgKeys == null && userKey == null) {
if (orgKeys?.size === 0 && userKey == null) {
// return early if there are no keys to decrypt with
return;
}