commit bd818709d683fba93ef89b48090a01d2c1045420
parent 40334ddd2543e6c2f4bf65529eeeaa9e8f03de35
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Sun, 6 Oct 2024 21:46:25 +0200
fix: rank by specific heat
The ranking function should also return 0 when the ranks are the same.
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/frontend/utils.js b/src/frontend/utils.js
@@ -89,9 +89,7 @@ export const rankByHeat = function(rankingComp) {
// rank by heat totals
let aHeatTotal = a.heats.find(h => h.heatId === r.value)?.summary
let bHeatTotal = b.heats.find(h => h.heatId === r.value)?.summary
- if (bHeatTotal - aHeatTotal !== 0) {
- return bHeatTotal - aHeatTotal
- }
+ return bHeatTotal - aHeatTotal
}
}
}