Commit 21c24eb9 by Matthew Piatetsky

Fix check for image url on program detail page

LEARNER-886
parent 524e2f3e
......@@ -48,7 +48,7 @@
if (courseRuns && courseRuns.length > 0) {
courseRun = courseRuns[0];
if (courseRun.hasOwnProperty('image')) {
if (courseRun.image && courseRun.image.src) {
courseImageUrl = courseRun.image.src;
} else {
// The course_image_url property is attached by setActiveCourseRun.
......@@ -191,7 +191,7 @@
startDateString = this.formatDate(courseRun.start, userPreferences);
}
if (courseRun.hasOwnProperty('image')) {
if (courseRun.image && courseRun.image.src) {
courseImageUrl = courseRun.image.src;
} else {
courseImageUrl = courseRun.course_image_url;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment