LP1849212: don't send empty courseId arrays to pcrud
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / share / bib-summary / bib-summary.component.ts
index ec3ba57..3a09fd8 100644 (file)
@@ -81,8 +81,10 @@ export class BibSummaryComponent implements OnInit {
         this.org.settings('circ.course_materials_opt_in').then(setting => {
             if (setting['circ.course_materials_opt_in']) {
                 this.course.fetchCoursesForRecord(recordId).then(courseList => {
-                    this.courses = courseList;
-                    this.hasCourse = true;
+                    if (courseList) {
+                        this.courses = courseList;
+                        this.hasCourse = true;
+                    }
                 });
             }
         });