jsdialog: prevent errors in closePopover

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia2fc78d06b54f0011d168ae769f11cbd137676a0
This commit is contained in:
Szymon Kłos 2021-11-15 12:35:34 +01:00 committed by Szymon Kłos
parent c2b5c6190b
commit 48d62bcf8a

View file

@ -53,6 +53,9 @@ L.Control.JSDialog = L.Control.extend({
},
closePopover: function(id, sendCloseEvent) {
if (!id || !this.dialogs[id])
return;
L.DomUtil.remove(this.dialogs[id].overlay);
var clickToClose = this.dialogs[id].clickToClose;
var builder = this.clearDialog(id);