diff --git a/src/core/courses/providers/helper.ts b/src/core/courses/providers/helper.ts index b918d3b1c..0d98fe61e 100644 --- a/src/core/courses/providers/helper.ts +++ b/src/core/courses/providers/helper.ts @@ -143,7 +143,7 @@ export class CoreCoursesHelperProvider { this.loadCourseExtraInfo(course, courseInfoAvailable ? coursesInfo[course.id] : course, loadCategoryNames); if (!course.courseImage) { course.colorNumber = course.id % 10; - course.color = colors[course.colorNumber]; + course.color = colors.length && colors[course.colorNumber]; } }); });