feedhenry / fh-sync

Node.js implementation of the FeedHenry Data Synchronisation Server. To be used in conjunction with the FeedHenry Data Synchronisation Client.
http://feedhenry.org
Apache License 2.0
5 stars 17 forks source link

🐛 Fix the current value for stats #35

Closed david-martin closed 6 years ago

david-martin commented 6 years ago

The 'current' value of each stat should be based off the most recent value. This change fixes a bug where the oldest value was used instead.

david-martin commented 6 years ago

@aidenkeating @wei-lee Could you check this for sanity. Its a tiny change to the code, but my understanding of that block of code is bit limited.

david-martin commented 6 years ago

@wei-lee Good point. I've moved it outside and that triggered the bug again, so I removed the .reverse() when moved outside. That seems to be the right combination now.