From f31464c8c0addea0fe40197da8d41165bfc36ad3 Mon Sep 17 00:00:00 2001 From: Rein Krul Date: Sun, 17 Nov 2024 14:35:28 +0100 Subject: [PATCH] Handle null fields in discovery service search results --- web/src/admin/DiscoveryServices.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/admin/DiscoveryServices.vue b/web/src/admin/DiscoveryServices.vue index 338c1ec..08b91ff 100644 --- a/web/src/admin/DiscoveryServices.vue +++ b/web/src/admin/DiscoveryServices.vue @@ -131,6 +131,8 @@ export default { const query = new URLSearchParams(entries); this.$api.get('api/proxy/internal/discovery/v1/' + this.selectedService.id + '?' + query.toString()) .then(data => { + // fields can be null, initialize with empty object with so. Otherwise, the UI crashes. + data.forEach(r => r.fields = r.fields || {}) this.searchResults = data }) .catch(response => {