1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-29 04:17:41 +02: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}