aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/geolocation.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-04-30 17:04:36 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-05-02 14:28:37 +0100
commit36c382ed12ba6da3164e256dd3e4ae97fa7235ea (patch)
tree8a6dfdc5bd4dc0460885a3c23963b22ba4a12249 /web/js/geolocation.js
parent8f84a7d80236d86428454f4916c285132bb8a6cb (diff)
Some IE8/old JS workarounds.
Diffstat (limited to 'web/js/geolocation.js')
-rw-r--r--web/js/geolocation.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/js/geolocation.js b/web/js/geolocation.js
index 3c2cf04df..fbef4d7ea 100644
--- a/web/js/geolocation.js
+++ b/web/js/geolocation.js
@@ -30,7 +30,7 @@ fixmystreet.geolocate = function(element, success_callback) {
var link = document.getElementById('geolocate_link');
if (!link) { return; }
var https = window.location.protocol.toLowerCase() === 'https:';
- if ('geolocation' in navigator && https) {
+ if ('geolocation' in navigator && https && window.addEventListener) {
fixmystreet.geolocate(link, function(pos) {
var latitude = pos.coords.latitude.toFixed(6);
var longitude = pos.coords.longitude.toFixed(6);