aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/geolocation.js
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2018-06-07 13:28:45 +0200
committerMarius Halden <marius.h@lden.org>2018-06-07 13:28:45 +0200
commit956f8b8a065824f9a9dc379eba1d0aa8b1b669cf (patch)
tree49f9ccb147b18dddee97500d4df7a3fb3dd3737c /web/js/geolocation.js
parent782457d016084c8de04989dbc824a71899f8b41b (diff)
parent4dbf5371f79c5f290c08e561ba2c881e96b58669 (diff)
Merge tag 'v2.3.3' into fiksgatami-dev
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);