@rasifix/orienteering-utils 2.0.44 → 2.0.46
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/formats/oware.js +2 -2
- package/lib/utils/ranking.js +1 -1
- package/package.json +1 -1
package/lib/formats/oware.js
CHANGED
|
@@ -64,8 +64,8 @@ var OwareFormat = /** @class */ (function () {
|
|
|
64
64
|
lines
|
|
65
65
|
.filter(function (line) { return line.trim().length > 0; })
|
|
66
66
|
.forEach(function (line) {
|
|
67
|
-
var cols = line.split(
|
|
68
|
-
if (cols.length
|
|
67
|
+
var cols = line.split(/;,/);
|
|
68
|
+
if (cols.length < 50) {
|
|
69
69
|
category = parseCategory(cols);
|
|
70
70
|
competition.categories.push(category);
|
|
71
71
|
}
|
package/lib/utils/ranking.js
CHANGED
|
@@ -86,7 +86,7 @@ function parseRanking(runners) {
|
|
|
86
86
|
var idealTime = Object.keys(legs)
|
|
87
87
|
.map(function (code) { return legs[code].idealSplit; })
|
|
88
88
|
.filter(function (time) { return time !== undefined; })
|
|
89
|
-
.reduce(sum);
|
|
89
|
+
.reduce(sum, 0);
|
|
90
90
|
// each leg's weight is calculated regarding as a ratio of the ideal split time to the ideal time
|
|
91
91
|
Object.keys(legs).forEach(function (code) {
|
|
92
92
|
var leg = legs[code];
|