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