mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: error after deleting a path that was previously moved (#2479)
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:
commit
b35740b029
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue