From 6757d734a2d7323a153f2164f7ad28ffc4e630f3 Mon Sep 17 00:00:00 2001 From: Adrian Rodriguez Date: Wed, 17 Apr 2024 11:00:28 +0200 Subject: [PATCH] Allow delete polygon when for multipolygon geometries --- leaflet/static/leaflet/leaflet.forms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leaflet/static/leaflet/leaflet.forms.js b/leaflet/static/leaflet/leaflet.forms.js index 43975610..1f938363 100644 --- a/leaflet/static/leaflet/leaflet.forms.js +++ b/leaflet/static/leaflet/leaflet.forms.js @@ -235,7 +235,7 @@ L.GeometryField = L.Class.extend({ }, onDeleted: function (e) { - var layer = e.layer; + var layer = e.layer || e.layers; this.drawnItems.removeLayer(layer); this.store.save(this.drawnItems); },