fix: error after deleting a path that was previously moved

When moving a path, this will put a once time listener on "moveend".
If we delete this feature, and move the map, we should not execute the
event callback.

A better fix would be to cancel the event listener on delete, but that
is much more work given how we deal with Leaflet events right now.
This commit is contained in:
Yohan Boniface 2025-02-04 17:40:49 +01:00
parent cc2f4ef81f
commit c985cb3de5

View file

@ -267,6 +267,8 @@ const PathMixin = {
}, },
makeGeometryEditable: function () { makeGeometryEditable: function () {
// Feature has been removed since then?
if (!this._map) return
if (this._map._umap.editedFeature !== this.feature) { if (this._map._umap.editedFeature !== this.feature) {
this.disableEdit() this.disableEdit()
return return