White space formatting and make sure we don't hit null if the parent isn't visible.

This commit is contained in:
danzel
2013-06-21 15:15:01 +12:00
parent 4d3c964172
commit 8807a0c3a2
+7 -8
View File
@@ -390,14 +390,13 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._map = null;
},
getVisibleParent: function(marker){
var vMarker = marker;
// TODO: Is this safe? No extra check needed to prevent infinite loop?
while(!vMarker._icon) {
vMarker = vMarker.__parent;
}
return vMarker;
},
getVisibleParent: function(marker){
var vMarker = marker;
while(vMarker !== null && !vMarker._icon) {
vMarker = vMarker.__parent;
}
return vMarker;
},
//Remove the given object from the given array
_arraySplice: function (anArray, obj) {