[Pkg-javascript-commits] [leaflet-markercluster] 353/479: Don't break if calling hasLayer with null. Fixes #170. Thanks @l0c0luke
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:50 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 e0846ced2d490a7c08ba909da3222037a815a198
Author: danzel <danzel at localhost.geek.nz>
Date: Fri May 10 09:35:55 2013 +1200
Don't break if calling hasLayer with null. Fixes #170. Thanks @l0c0luke
---
src/MarkerClusterGroup.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 9f4ae75..a46b1b7 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -261,7 +261,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Returns true if the given layer is in this MarkerClusterGroup
hasLayer: function (layer) {
- if (layer._noHas) {
+ if (!layer || layer._noHas) {
return false;
}
--
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