From 93ab8b7ec10c46ef31d6aaa5bcd9737c19ceb2d3 Mon Sep 17 00:00:00 2001 From: Jonathan Prusik Date: Thu, 12 Jun 2025 16:15:50 -0400 Subject: [PATCH] add optional chaining to possibly nullish orgKeys (#15172) --- libs/common/src/vault/services/cipher.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index 762b2bd3688..798821f0567 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -448,12 +448,12 @@ export class CipherService implements CipherServiceAbstraction { if (await this.configService.getFeatureFlag(FeatureFlag.PM4154_BulkEncryptionService)) { return await this.bulkEncryptService.decryptItems( groupedCiphers, - keys.orgKeys[orgId as OrganizationId] ?? keys.userKey, + keys.orgKeys?.[orgId as OrganizationId] ?? keys.userKey, ); } else { return await this.encryptService.decryptItems( groupedCiphers, - keys.orgKeys[orgId as OrganizationId] ?? keys.userKey, + keys.orgKeys?.[orgId as OrganizationId] ?? keys.userKey, ); } }),