1

Handle geolocation not being available in browser

This commit is contained in:
Alex Yatskov 2014-11-17 16:33:15 +09:00
parent 51cafdf034
commit 1f5e27a24f

View File

@ -246,11 +246,16 @@
},
ready: function() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
function(geo) { onReady(geo); },
function(err) { onReady(null); },
{enableHighAccuracy: true}
);
}
else {
onReady(null);
}
}
});
}(window.hscd = window.hscd || {}));