1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 03:33:30 +00:00

PM-27739 fixed type error where ciphers could be null

This commit is contained in:
voommen-livefront
2025-11-05 15:16:37 -06:00
parent 8792bb9c0b
commit 528d8b8dab

View File

@@ -84,11 +84,11 @@ export class AllApplicationsComponent implements OnInit {
}
// Map ciphers to each application
const cipherMap = new Map(ciphers.map((c) => [c.id, c]));
const cipherMap = new Map(ciphers?.map((c) => [c.id, c]));
const reportWithCiphers = report.reportData.map((app) => ({
...app,
ciphers: app.cipherIds
.map((id) => cipherMap.get(id))
.map((id) => cipherMap?.get(id))
.filter((c): c is CipherView => c !== undefined),
}));