[Pkg-javascript-commits] [leaflet-markercluster] 230/479: Don't barf if we are asked to remove a layer that we don't have
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit 4d51105c44426dda01a1d0d5d756e757a3919fe1
Author: danzel <danzel at localhost.geek.nz>
Date: Wed Sep 12 17:40:43 2012 +1200
Don't barf if we are asked to remove a layer that we don't have
---
src/MarkerClusterGroup.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index fde1ab3..e7fea27 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git
More information about the Pkg-javascript-commits
mailing list