Don't break if calling hasLayer with null. Fixes #170. Thanks @l0c0luke

This commit is contained in:
danzel
2013-05-10 09:36:15 +12:00
parent c34f507863
commit e0846ced2d
+1 -1
View File
@@ -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;
}