Skip to content

Commit f31464c

Browse files
committed
Handle null fields in discovery service search results
1 parent d829b97 commit f31464c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

web/src/admin/DiscoveryServices.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ export default {
131131
const query = new URLSearchParams(entries);
132132
this.$api.get('api/proxy/internal/discovery/v1/' + this.selectedService.id + '?' + query.toString())
133133
.then(data => {
134+
// fields can be null, initialize with empty object with so. Otherwise, the UI crashes.
135+
data.forEach(r => r.fields = r.fields || {})
134136
this.searchResults = data
135137
})
136138
.catch(response => {

0 commit comments

Comments
 (0)