diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index fde1ab3d2..e7fea2796 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -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);