aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/js/views/around.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/www/js/views/around.js b/www/js/views/around.js
index 718721b..8720ccc 100644
--- a/www/js/views/around.js
+++ b/www/js/views/around.js
@@ -110,6 +110,11 @@
centerMapOnPosition: function(e) {
e.preventDefault();
+ if ( !fixmystreet.map ) {
+ return;
+ }
+ // if there isn't a currentPosition then something
+ // is up so we probably should not recenter
if ( FMS.currentPosition ) {
fixmystreet.map.panTo(FMS.currentPosition);
}