jsdialog: check if "map" var is not undefined

Change-Id: I7ae6b557ab035b9f66bcb65e1c85ac9da0b993e7
Signed-off-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2023-11-18 10:30:52 -04:00 committed by Szymon Kłos
parent a23adac78c
commit a55244c547

View file

@ -606,7 +606,8 @@ L.Control.JSDialog = L.Control.extend({
// They are displayed before the document is loaded
// Spinning should be happening until the 1st interaction with the user
// which is the dialog opening in this case
this.map._progressBar.end();
if (this.map)
this.map._progressBar.end();
this.createContainer(instance, instance.overlay ? instance.overlay: instance.containerParent);
this.createDialog(instance);