Skip to content

Commit fa398b9

Browse files
committed
ui: do not show config details if no details
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 11f1c67 commit fa398b9

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

ui/src/components/view/DetailsTab.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -401,20 +401,17 @@ export default {
401401
return null
402402
}
403403
const details = this.dataResource[detailsKey]
404-
if (!details || Object.keys(details).length === 0) {
404+
if (!details || typeof details !== 'object') {
405405
return null
406406
}
407407
const prefix = 'External:'
408-
if (details && typeof details === 'object' && Object.keys(details).length > 0) {
409-
const result = {}
410-
for (const key in details) {
411-
if (key.startsWith(prefix)) {
412-
result[key.substring(prefix.length)] = details[key]
413-
}
408+
const result = {}
409+
for (const key in details) {
410+
if (key.startsWith(prefix)) {
411+
result[key.substring(prefix.length)] = details[key]
414412
}
415-
return result
416413
}
417-
return null
414+
return Object.keys(result).length > 0 ? result : null
418415
}
419416
},
420417
created () {

0 commit comments

Comments
 (0)