only show if key is set

This commit is contained in:
j 2021-02-07 11:48:35 +01:00
parent 762c5e773c
commit 2034a99c7a

View file

@ -232,7 +232,7 @@ pandora.ui.documentInfoView = function(data, isMixed) {
}, },
keys: ['id', 'name', 'description'] keys: ['id', 'name', 'description']
}, function(result) { }, function(result) {
if ((result && result.data.items.length == 1) || canEdit) { if (data[key] && ((result && result.data.items.length == 1) || canEdit)) {
var entity = {} var entity = {}
if (result && result.data.items.length) { if (result && result.data.items.length) {
entity = result.data.items[0] entity = result.data.items[0]