Permalink
Browse files

Fix Google Maps API suddenly return null if bounds are not yet final

  • Loading branch information...
cheeaun committed Feb 16, 2018
1 parent 4d331ef commit ab3c39a20f2c74760942a1fb319344bcae191eb4
Showing with 1 addition and 0 deletions.
  1. +1 −0 assets/app.js
@@ -192,6 +192,7 @@ function initMap(){
var $boundsWarning = $('bounds-warning');
map.addListener('bounds_changed', function(){
var bounds = map.getBounds();
if (!bounds) return;
if (bounds.intersects(mapBounds)){
$boundsWarning.classList.remove('visible');
} else {

0 comments on commit ab3c39a

Please sign in to comment.