From 6b92c40ea867688af8a27d92d94b7bebdfe8cbe2 Mon Sep 17 00:00:00 2001 From: echarp Date: Sat, 25 Jun 2016 16:16:05 +0200 Subject: [PATCH] Quick correction so that the map bouding code will be working again in all browsers --- app/assets/javascripts/maps.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/maps.js.coffee b/app/assets/javascripts/maps.js.coffee index 467b409b..ad553f7b 100644 --- a/app/assets/javascripts/maps.js.coffee +++ b/app/assets/javascripts/maps.js.coffee @@ -39,7 +39,7 @@ $(document).ready -> map.addLayer layer controls.addOverlay layer, text + ' - ' + json.length - if (location.href.contains('maps/') || url.contains('maps.json')) && layer.getBounds()._northEast && layer.getBounds()._southWest + if (/maps\//.test(location.href) || /maps.json/.test url) && layer.getBounds()._northEast && layer.getBounds()._southWest # Automatic focus to all displayed events map.fitBounds layer.getBounds()