Handle geolocation not being available in browser
This commit is contained in:
parent
51cafdf034
commit
1f5e27a24f
@ -246,11 +246,16 @@
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
function(geo) { onReady(geo); },
|
||||
function(err) { onReady(null); },
|
||||
{enableHighAccuracy: true}
|
||||
);
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
function(geo) { onReady(geo); },
|
||||
function(err) { onReady(null); },
|
||||
{enableHighAccuracy: true}
|
||||
);
|
||||
}
|
||||
else {
|
||||
onReady(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}(window.hscd = window.hscd || {}));
|
||||
|
Loading…
Reference in New Issue
Block a user