mirror of
https://github.com/bitwarden/browser
synced 2026-02-03 02:03:53 +00:00
Fix TypeScript errors for optional newApplications field
Handle the possibility of newApplications being undefined by using nullish coalescing operators to provide safe defaults: - Use empty array [] as fallback for newApplications - Use 0 as fallback for newApplicationsCount This fixes the type errors: - TS2322: Type 'string[] | undefined' is not assignable to type 'string[]' - TS18048: 'summary.newApplications' is possibly 'undefined' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -69,8 +69,8 @@ export class AllActivityComponent implements OnInit {
|
||||
this.totalCriticalAppsAtRiskMemberCount = summary.totalCriticalAtRiskMemberCount;
|
||||
this.totalCriticalAppsCount = summary.totalCriticalApplicationCount;
|
||||
this.totalCriticalAppsAtRiskCount = summary.totalCriticalAtRiskApplicationCount;
|
||||
this.newApplications = summary.newApplications;
|
||||
this.newApplicationsCount = summary.newApplications.length;
|
||||
this.newApplications = summary.newApplications ?? [];
|
||||
this.newApplicationsCount = summary.newApplications?.length ?? 0;
|
||||
});
|
||||
|
||||
this.allActivitiesService.passwordChangeProgressMetricHasProgressBar$
|
||||
|
||||
Reference in New Issue
Block a user