From 13d4fd98c869e4d1104438f296fcfe8bac3d0c6b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Oct 2025 05:30:28 +0000 Subject: [PATCH] Fix TypeScript errors for optional newApplications field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../access-intelligence/activity/all-activity.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/activity/all-activity.component.ts b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/activity/all-activity.component.ts index 9689110866a..fa97d0f67e6 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/activity/all-activity.component.ts +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/activity/all-activity.component.ts @@ -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$