From a2701fa48b032c8b580dd9f10cbee9877c13d8cc Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2026 22:48:40 +0000 Subject: [PATCH] fix(CLARK-CLIENT-1T): Prevent TypeError when collections are empty on user profile --- .../profile-learning-objects.component.html | 4 ++-- .../profile-learning-objects.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/cube/user-profile/components/profile-learning-objects/profile-learning-objects.component.html b/src/app/cube/user-profile/components/profile-learning-objects/profile-learning-objects.component.html index 61f9b75a7..4a0cc7283 100644 --- a/src/app/cube/user-profile/components/profile-learning-objects/profile-learning-objects.component.html +++ b/src/app/cube/user-profile/components/profile-learning-objects/profile-learning-objects.component.html @@ -19,7 +19,7 @@

My Contributions

role="tab" (click)=" activateMainTab('released'); - content(1, collectionsReleased[0].abvName); + content(1, collectionsReleased[0]?.abvName); activateCollectionTab(0) " [ngClass]="{ active: tabMain === 1 }"> @@ -30,7 +30,7 @@

My Contributions

role="tab" (click)=" activateMainTab('review'); - content(2, collectionsUnreleased[0].abvName); + content(2, collectionsUnreleased[0]?.abvName); activateCollectionTab(0) " [ngClass]="{ active: tabMain === 2 }"> diff --git a/src/app/cube/user-profile/components/profile-learning-objects/profile-learning-objects.component.ts b/src/app/cube/user-profile/components/profile-learning-objects/profile-learning-objects.component.ts index 521446129..b0cda4c57 100644 --- a/src/app/cube/user-profile/components/profile-learning-objects/profile-learning-objects.component.ts +++ b/src/app/cube/user-profile/components/profile-learning-objects/profile-learning-objects.component.ts @@ -99,7 +99,7 @@ export class ProfileLearningObjectsComponent implements OnChanges { a.name.localeCompare(b.name), ); // Default first released collection tab values - this.content(this.tabMain, this.collectionsReleased[0].abvName); + this.content(this.tabMain, this.collectionsReleased[0]?.abvName); this.loading = false; }); }