Skip to content

refactor query method for Android platform#366

Open
seamlink-aalves wants to merge 2 commits intodariosalvi78:masterfrom
seamlink-aalves:master
Open

refactor query method for Android platform#366
seamlink-aalves wants to merge 2 commits intodariosalvi78:masterfrom
seamlink-aalves:master

Conversation

@seamlink-aalves
Copy link

Refactored query function to avoid recursion

Closes #365

@dariosalvi78
Copy link
Owner

the issue I have with this is that onSuccess(data) will be called as soon as the loop has finished iterating on the received data array, with additional queries for distance and calories still pending. Isn't this your experience ?

@seamlink-aalves
Copy link
Author

You are correct. I missed that detail. I've pushed another change to the PR where I wrap the queryAgregate in a Promise and use it with async/await

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

Successfully merging this pull request may close these issues.

Uncaught RangeError RangeError: Maximum call stack size exceeded

2 participants