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() { 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 || {}));