mgr/dashboard: fix Cannot read properties of undefined (reading 'filter')

Fixes: https://tracker.ceph.com/issues/57434
Signed-off-by: Nizamudeen A <nia@redhat.com>
This commit is contained in:
Nizamudeen A 2022-09-04 11:22:45 +05:30
parent d3a03afa28
commit a3f601b5e7

View File

@ -485,7 +485,7 @@ export class ServiceFormComponent extends CdForm implements OnInit {
getServiceIds(selectedServiceType: string) {
this.serviceIds = this.serviceList
.filter((service) => service['service_type'] === selectedServiceType)
?.filter((service) => service['service_type'] === selectedServiceType)
.map((service) => service['service_id']);
}