From 6067c53edf8c471b0c33cb1867281dcdd1067607 Mon Sep 17 00:00:00 2001
From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com>
Date: Tue, 25 Aug 2026 22:35:34 +0000
Subject: [PATCH] Bug/CLARK-CLIENT-2B/fix-typeerror-empty-collections
---
.../profile-learning-objects.component.html | 4 ++--
.../profile-learning-objects.component.ts | 4 +++-
2 files changed, 5 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..f9e43d731 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);
+ collectionsReleased.length && 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);
+ collectionsUnreleased.length && 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..17f247dc9 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,9 @@ export class ProfileLearningObjectsComponent implements OnChanges {
a.name.localeCompare(b.name),
);
// Default first released collection tab values
- this.content(this.tabMain, this.collectionsReleased[0].abvName);
+ if (this.collectionsReleased.length > 0) {
+ this.content(this.tabMain, this.collectionsReleased[0].abvName);
+ }
this.loading = false;
});
}