Skip to content

Commit

Permalink
Fix Google Maps return null bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Feb 16, 2018
1 parent 5260987 commit 810b7ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assets/js/app.js
Expand Up @@ -193,6 +193,7 @@
var $boundsWarning = $('#bounds-warning');
google.maps.event.addListener(map, 'bounds_changed', function(){
var mapBounds = map.getBounds();
if (!mapBounds) return;
if (mapBounds.intersects(bounds)){
$boundsWarning.removeClass('visible');
} else {
Expand Down

0 comments on commit 810b7ce

Please sign in to comment.