MOBILE-3217 course: Check colors array is populated

main
Pau Ferrer Ocaña 2019-12-04 15:07:22 +01:00
parent 2a6a3876b9
commit bc33ae3bf8
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ export class CoreCoursesHelperProvider {
this.loadCourseExtraInfo(course, courseInfoAvailable ? coursesInfo[course.id] : course, loadCategoryNames); this.loadCourseExtraInfo(course, courseInfoAvailable ? coursesInfo[course.id] : course, loadCategoryNames);
if (!course.courseImage) { if (!course.courseImage) {
course.colorNumber = course.id % 10; course.colorNumber = course.id % 10;
course.color = colors[course.colorNumber]; course.color = colors.length && colors[course.colorNumber];
} }
}); });
}); });