jsdialog: don't request .../undefined when no image

Change-Id: I7ee0e8678350d28da82c983713cac5627d099e54
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
This commit is contained in:
Szymon Kłos 2021-07-20 09:12:51 +02:00 committed by Szymon Kłos
parent 72ac57cce5
commit d6d4a5bfed

View file

@ -1692,7 +1692,8 @@ L.Control.JSDialogBuilder = L.Control.extend({
var icon = L.DomUtil.create('div', builder.options.cssClass + ' ui-iconview-icon', parentContainer);
var img = L.DomUtil.create('img', builder.options.cssClass, icon);
img.src = entry.image;
if (entry.image)
img.src = entry.image;
img.alt = entry.text;
var text = L.DomUtil.create('div', builder.options.cssClass + ' ui-iconview-text', parentContainer);