diff --git a/js/soundmap.front.js b/js/soundmap.front.js index 323899f..a38561d 100644 --- a/js/soundmap.front.js +++ b/js/soundmap.front.js @@ -97,7 +97,7 @@ layer.on('click', self.onMarkerClick); } }).addTo(this.map); - this.map.fitBounds(this.markers.getBounds()); + if (this.markers.getBounds()) this.map.fitBounds(this.markers.getBounds()); }, ajaxFail: function(){