MOBILE-3217 course: Check colors array is populated
parent
2a6a3876b9
commit
bc33ae3bf8
|
@ -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];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue