Skip to content

Commit

Permalink
Revert "Additional checks to prevent errors during atypical use"
Browse files Browse the repository at this point in the history
This reverts commit 419b1ab.
#1 (comment)
  • Loading branch information
johndoe committed May 1, 2019
1 parent dd51fea commit 79b7485
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/plugin/leaflet.canvas-markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ function layerFactory(L) {
);
},
_searchPoints: function (point) {
if (this._markers)
return this._markers.search({ minX: point.x, minY: point.y, maxX: point.x, maxY: point.y });
return this._markers.search({ minX: point.x, minY: point.y, maxX: point.x, maxY: point.y });
},
on: function (types, fn, context) {
var internal = ['click', 'mouseover', 'mouseout']; // TODO
Expand Down Expand Up @@ -557,10 +556,8 @@ function layerFactory(L) {
},
_removeGeneric: function (val, compareFn)
{
if (this._latlngMarkers) {
this._latlngMarkers.remove(val, compareFn);
this._latlngMarkers.total--;
}
this._latlngMarkers.remove(val, compareFn);
this._latlngMarkers.total--;
},
addTo: function (map) {
map.addLayer(this);
Expand Down

0 comments on commit 79b7485

Please sign in to comment.