diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-applications/all-applications.component.ts b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-applications/all-applications.component.ts index 919fbf1ac9b..7d9c7704d67 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-applications/all-applications.component.ts +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-applications/all-applications.component.ts @@ -84,10 +84,14 @@ export class AllApplicationsComponent implements OnInit { } // Map ciphers to each application + const cipherMap = new Map(ciphers.map((c) => [c.id, c])); const reportWithCiphers = report.reportData.map((app) => ({ ...app, - ciphers: ciphers?.filter((cipher) => app.cipherIds.includes(cipher.id)) ?? [], + ciphers: app.cipherIds + .map((id) => cipherMap.get(id)) + .filter((c): c is CipherView => c !== undefined), })); + return of({ ...report, reportData: reportWithCiphers }); }), takeUntilDestroyed(this.destroyRef),