mirror of
https://github.com/bitwarden/browser
synced 2026-02-01 17:23:37 +00:00
PM-27739 fixed type errors
This commit is contained in:
@@ -84,7 +84,7 @@ export class RiskInsightsOrchestratorService {
|
||||
// ------------------------- Cipher data -------------------------
|
||||
private _ciphersSubject = new BehaviorSubject<CipherView[] | null>(null);
|
||||
private _ciphers$ = this._ciphersSubject.asObservable();
|
||||
get ciphers$(): Observable<CipherView[]> {
|
||||
get ciphers$(): Observable<CipherView[] | null> {
|
||||
return this._ciphers$;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export class RiskInsightsDataService {
|
||||
readonly isGeneratingReport$: Observable<boolean> = of(false);
|
||||
readonly criticalReportResults$: Observable<RiskInsightsEnrichedData | null> = of(null);
|
||||
readonly hasCiphers$: Observable<boolean | null> = of(null);
|
||||
readonly ciphers$: Observable<CipherView[]> = of([]);
|
||||
readonly ciphers$: Observable<CipherView[] | null> = of(null);
|
||||
|
||||
// New applications that need review (reviewedDate === null)
|
||||
readonly newApplications$: Observable<ApplicationHealthReportDetail[]> = of([]);
|
||||
|
||||
@@ -80,13 +80,13 @@ export class AllApplicationsComponent implements OnInit {
|
||||
.pipe(
|
||||
switchMap(([report, ciphers]) => {
|
||||
if (!report) {
|
||||
return null;
|
||||
return of(null);
|
||||
}
|
||||
|
||||
// Map ciphers to each application
|
||||
const reportWithCiphers = report.reportData.map((app) => ({
|
||||
...app,
|
||||
ciphers: ciphers.filter((cipher) => app.cipherIds.includes(cipher.id)),
|
||||
ciphers: ciphers?.filter((cipher) => app.cipherIds.includes(cipher.id)) ?? [],
|
||||
}));
|
||||
return of({ ...report, reportData: reportWithCiphers });
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user