Skip to content

Commit

Permalink
fixes #101
Browse files Browse the repository at this point in the history
  • Loading branch information
Dario Salvi committed Jan 31, 2018
1 parent 83fde80 commit d551a1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/ios/health.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ Health.prototype.query = function (opts, onSuccess, onError) {
if ((res.startDate >= opts.startDate) && (res.endDate <= opts.endDate)) {
res.value = data[i].activityType;
res.unit = 'activityType';
res.calories = parseInt(data[i].energy.slice(0, -2)); // remove the ending J
res.distance = parseInt(data[i].distance);
if (data[i].energy) res.calories = parseInt(data[i].energy.slice(0, -2)); // remove the ending J
if (data[i].distance) res.distance = parseInt(data[i].distance);
res.sourceName = data[i].sourceName;
res.sourceBundleId = data[i].sourceBundleId;
result.push(res);
Expand Down

0 comments on commit d551a1c

Please sign in to comment.