fix: do not try to close editPanel if not set

When in the user dashboard and opening a map preview, when we
press escape it will try to close non existing panels (they are
not instantiated given there is not edit mode there)
This commit is contained in:
Yohan Boniface 2024-04-17 11:10:40 +02:00
parent d0cc1cdd3d
commit 0c1c5f117d

View file

@ -524,8 +524,8 @@ U.Map = L.Map.extend({
this.help.hide() this.help.hide()
} else { } else {
this.panel.close() this.panel.close()
this.editPanel.close() this.editPanel?.close()
this.fullPanel.close() this.fullPanel?.close()
} }
} }