Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: undefined is not an object (evaluating 'data[i].energy.slice') #101

Closed
GeorgeHarbers opened this issue Jan 31, 2018 · 1 comment

Comments

@GeorgeHarbers
Copy link

GeorgeHarbers commented Jan 31, 2018

I think I have found a bug in the query when using dataType activity on iOS.

On line 214 of health.js the following code is present:

res.calories = parseInt(data[i].energy.slice(0, -2)); // remove the ending J

This results in the following error:

TypeError: undefined is not an object (evaluating 'data[i].energy.slice')

This makes it impossible for us to use the activity dataType on iOS. Is there any workaround or fix for this available?

Thanks in advance!

img_909116c75539-1

@ghost
Copy link

ghost commented Jan 31, 2018

the only explanation can be because there is no energy associated with that sample, which is strange. The fix is quite immediate.

@ghost ghost closed this as completed in d551a1c Jan 31, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant