From dcda71f06f5439b78d31aae615cf2bce4b4d7c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 26 Nov 2021 14:02:50 +0100 Subject: [PATCH] MOBILE-3806 course: Fix hidden 0% progress --- .../course-list-item/core-courses-course-list-item.html | 3 +-- .../courses/components/course-list-item/course-list-item.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html b/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html index 91e596ed5..e6255cc27 100644 --- a/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html +++ b/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html @@ -30,7 +30,7 @@ + class="core-course-list-card" [class.item-dimmed]="course.hidden">
@@ -51,7 +51,6 @@
- diff --git a/src/core/features/courses/components/course-list-item/course-list-item.ts b/src/core/features/courses/components/course-list-item/course-list-item.ts index 70304420b..bf9d4419f 100644 --- a/src/core/features/courses/components/course-list-item/course-list-item.ts +++ b/src/core/features/courses/components/course-list-item/course-list-item.ts @@ -157,7 +157,7 @@ export class CoreCoursesCourseListItemComponent implements OnInit, OnDestroy, On * Helper function to update course fields. */ protected updateCourseFields(): void { - this.progress = 'progress' in this.course ? this.course.progress || -1 : -1; + this.progress = 'progress' in this.course && typeof this.course.progress == 'number' ? this.course.progress : -1; this.completionUserTracked = 'completionusertracked' in this.course && this.course.completionusertracked; }