@rasifix/orienteering-utils 2.0.69 → 2.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils/ranking.js +2 -2
- package/package.json +1 -1
package/lib/utils/ranking.js
CHANGED
|
@@ -111,7 +111,7 @@ function parseRanking(runners) {
|
|
|
111
111
|
split.overall = {
|
|
112
112
|
behind: behind
|
|
113
113
|
};
|
|
114
|
-
split.position = weightSum + split.weight;
|
|
114
|
+
split.position = Math.min(1, weightSum + split.weight);
|
|
115
115
|
if (split.weight) {
|
|
116
116
|
weightSum += split.weight;
|
|
117
117
|
}
|
|
@@ -169,7 +169,7 @@ function parseRanking(runners) {
|
|
|
169
169
|
// now calculate the split ranks and behinds for each split of each runner
|
|
170
170
|
rankingRunners.forEach(function (runner) {
|
|
171
171
|
runner.splits.forEach(function (split) {
|
|
172
|
-
var tap = timesAtPosition(split.position);
|
|
172
|
+
var tap = timesAtPosition(Math.min(1, split.position));
|
|
173
173
|
var times = tap
|
|
174
174
|
.filter(function (entry) { return entry.time && entry.time > 0; })
|
|
175
175
|
.map(function (entry) {
|