From 90e2779fab7e07e525e0e9769359e93cdbe2ebae Mon Sep 17 00:00:00 2001 From: Robyn MacCallum Date: Thu, 2 Nov 2023 19:28:13 -0400 Subject: [PATCH] [PM-4660] Check size of orgKeys map instead of against null (#6776) * Check size of orgKeys map for nullness * Add null check on orgKeys --- libs/common/src/vault/services/cipher.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index ae486302e59..6f669555ae6 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -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; }