1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-04 18:53:20 +00:00

PM-27739 optimization recommended by claude applied

This commit is contained in:
voommen-livefront
2025-11-05 15:02:34 -06:00
parent 7e5b1964a5
commit 8792bb9c0b

View File

@@ -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),