Skip to content

Commit a3dfd49

Browse files
author
LazyTesting
committed
Downhill does not take flat into account anymore
1 parent 4d74577 commit a3dfd49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/filter-downhill/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const mapTwo = require('../../utils/map-two');
2222
* @returns {number} result - sum of results
2323
*/
2424
const get = function(trackPoints, callback) {
25-
const downHillFilter = (pos1, pos2) => pos1.ele >= pos2.ele ? callback(pos1, pos2) : 0;
25+
const downHillFilter = (pos1, pos2) => pos1.ele > pos2.ele ? callback(pos1, pos2) : 0;
2626
const downhillItems = mapTwo(trackPoints, downHillFilter);
2727

2828
return downhillItems.reduce((prev, cur) => prev + cur);

0 commit comments

Comments
 (0)