Skip to content

Commit

Permalink
chore: do not try to remove an icon not in DOM
Browse files Browse the repository at this point in the history
This occurs when using cluster, which already add/remove markers
  • Loading branch information
yohanboniface committed Oct 10, 2024
1 parent c6da1f9 commit ca3451c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions umap/static/umap/js/modules/rendering/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ const FeatureMixin = {
}
},

_removeIcon: function () {
// It may not be in the DOM, and Leaflet does not deal with this
// situation
if (this._icon) Marker.prototype._removeIcon.call(this)
},

addInteractions: function () {
this.on('contextmenu editable:vertex:contextmenu', this.onContextMenu)
this.on('click', this.onClick)
Expand Down

0 comments on commit ca3451c

Please sign in to comment.