Don't barf if we are asked to remove a layer that we don't have

This commit is contained in:
danzel
2012-09-12 17:40:43 +12:00
parent 7b065bd493
commit 4d51105c44
+4
View File
@@ -94,6 +94,10 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
},
removeLayer: function (layer) {
if (!layer.__parent) {
return this;
}
if (this._unspiderfy) {
this._unspiderfy();
this._unspiderfyLayer(layer);