diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-03 11:08:05 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-03 11:08:05 +0100 |
commit | 1a84ff9e9c0675f9487da08e7f5d11088a5d79f8 (patch) | |
tree | 93940979281a13e2e05c41a7a27ae55791bfec49 /web/js/geolocation.js | |
parent | 85cdf1d51ad06836f824a1053924185b7bc8f236 (diff) | |
parent | 536fdcd39d0d6bd76954d6baa672a3b7f266d155 (diff) |
Merge branch 'drop-ie7'
Diffstat (limited to 'web/js/geolocation.js')
-rw-r--r-- | web/js/geolocation.js | 2 |
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); |