prevent some uncaught exceptions with grids
authorJason Etheridge <jason@EquinoxOLI.org>
Wed, 14 Dec 2022 05:52:37 +0000 (00:52 -0500)
committerJason Etheridge <jason@EquinoxOLI.org>
Wed, 14 Dec 2022 05:52:37 +0000 (00:52 -0500)
Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts

index e5add56..7c88ac1 100644 (file)
@@ -337,8 +337,8 @@ export class GridFilterControlComponent implements OnInit {
     }
 
     reset() {
-        this.filterComboboxes.forEach(ctl => { ctl.applyEntryId(null); });
-        this.orgSelects.forEach(ctl => { ctl.reset(); });
+        if (this.filterComboboxes) { this.filterComboboxes.forEach(ctl => { ctl.applyEntryId(null); }); }
+        if (this.orgSelects) { this.orgSelects.forEach(ctl => { ctl.reset(); }); }
         if (this.dateSelectOne) { this.dateSelectOne.reset(); }
         if (this.dateSelectTwo) { this.dateSelectTwo.reset(); }
     }