Skip to content

Commit

Permalink
Additional checks to prevent errors during atypical use
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 authored and johndoe committed May 7, 2019
1 parent 153525e commit a79109d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plugin/leaflet.canvas-markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,10 @@ function layerFactory(L) {
},
_removeGeneric: function (val, compareFn)
{
this._latlngMarkers.remove(val, compareFn);
this._latlngMarkers.total--;
if (this._latlngMarkers) {
this._latlngMarkers.remove(val, compareFn);
this._latlngMarkers.total--;
}
},
addTo: function (map) {
map.addLayer(this);
Expand Down

1 comment on commit a79109d

@johnd0e
Copy link

@johnd0e johnd0e commented on a79109d May 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

Please sign in to comment.