Make removeLayers when not on the map a bit less wasteful

This commit is contained in:
danzel
2012-10-11 10:45:16 +13:00
parent 5064f6e8fc
commit 1cc375d324
+1 -1
View File
@@ -154,7 +154,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (!this._map) {
for (i = 0, l = layersArray.length; i < l; i++) {
this.removeLayer(layersArray[i]);
this._arraySplice(this._needsClustering, layersArray[i]);
}
return this;
}