fix: error after deleting a path that was previously moved (#2479)
Some checks are pending
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run

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 18:00:09 +01:00 committed by GitHub
commit b35740b029
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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