Improve affect bounds handling.

This commit is contained in:
David Molineus
2015-01-21 20:37:53 +01:00
parent b3eb4c8e61
commit 72f5e3b9ed
5 changed files with 10 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ L.Map.include({
this._dynamicBounds = L.latLngBounds(source, source);
}
}
} else if (layer instanceof L.MarkerClusterGroup && layer.options.affectBounds) {
} else if (L.MarkerClusterGroup && layer instanceof L.MarkerClusterGroup && layer.options.affectBounds) {
source = layer.getBounds();
if (source.isValid()) {