Skip to content

Commit

Permalink
Handle null fields in discovery service search results
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul committed Nov 17, 2024
1 parent d829b97 commit f31464c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/src/admin/DiscoveryServices.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit f31464c

Please sign in to comment.