Skip to content

Commit

Permalink
geolocation: Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinnl committed Mar 6, 2019
1 parent 35c2dd3 commit a4220d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/geolocation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function Geolocation(options) {
}
this.options = options || {};
this.options.frequency = this.options.frequency || 1;

return this;
}

Expand All @@ -41,7 +42,7 @@ Geolocation.prototype.update = function update() {
self.hasReading = false;
self.sensor.read(function(err, data) {
if (err || data === null || typeof data === 'undefined') {
return self.onerror(data)
return self.onerror(data);
}
self.timestamp = new Date();
self.latitude = data.latitude;
Expand Down
4 changes: 2 additions & 2 deletions lib/geolocation/simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function Simulator () {
}

Simulator.prototype.read = function (callback) {
this.value.latitude = Math.random() * 180 - 90;
this.value.longitude = Math.random() * 360 - 180;
this.value.latitude = (Math.random() * 180) - 90;
this.value.longitude = (Math.random() * 360) - 180;
if (callback) return callback(null, this.value);
};

Expand Down

0 comments on commit a4220d6

Please sign in to comment.