Commit 5cf828a7 by Matthew Piatetsky Committed by GitHub

Merge pull request #15077 from edx/LEARNER-886

LEARNER-886 Fix check for image url on program detail page
parents 524e2f3e 21c24eb9
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
if (courseRuns && courseRuns.length > 0) { if (courseRuns && courseRuns.length > 0) {
courseRun = courseRuns[0]; courseRun = courseRuns[0];
if (courseRun.hasOwnProperty('image')) { if (courseRun.image && courseRun.image.src) {
courseImageUrl = courseRun.image.src; courseImageUrl = courseRun.image.src;
} else { } else {
// The course_image_url property is attached by setActiveCourseRun. // The course_image_url property is attached by setActiveCourseRun.
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
startDateString = this.formatDate(courseRun.start, userPreferences); startDateString = this.formatDate(courseRun.start, userPreferences);
} }
if (courseRun.hasOwnProperty('image')) { if (courseRun.image && courseRun.image.src) {
courseImageUrl = courseRun.image.src; courseImageUrl = courseRun.image.src;
} else { } else {
courseImageUrl = courseRun.course_image_url; 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