diff --git a/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js b/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js index ae27783bb..203714c41 100644 --- a/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js +++ b/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js @@ -1,6 +1,6 @@ var reportedPositionFailures = 0; navigator.geolocation.getCurrentPosition = function(success, failure, options) { //override because default implementation requires GPS permission - geoposition = JSON.parse(GBjs.getCurrentPosition()); + var geoposition = JSON.parse(GBjs.getCurrentPosition()); if(options && options.maximumAge && (geoposition.timestamp < Date.now() - options.maximumAge) && reportedPositionFailures <= 10 ) { reportedPositionFailures++;