From d6d4a5bfed2e604b7c77c30e4efb99b2de9c8baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Tue, 20 Jul 2021 09:12:51 +0200 Subject: [PATCH] jsdialog: don't request .../undefined when no image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7ee0e8678350d28da82c983713cac5627d099e54 Signed-off-by: Szymon Kłos --- loleaflet/src/control/Control.JSDialogBuilder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 28dc7eceb..1dc0e1aee 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -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);