@rasifix/orienteering-utils 2.0.8 → 2.0.10

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/index.js CHANGED
@@ -7,3 +7,6 @@ var ranking = require("./utils/ranking");
7
7
  exports.ranking = ranking;
8
8
  var model = require("./model");
9
9
  exports.model = model;
10
+ var time = require("./time");
11
+ exports.formatTime = time.formatTime;
12
+ exports.parseTime = time.parseTime;
@@ -348,7 +348,8 @@ function defineLegProperties(legs) {
348
348
  if (selected.length > 0) {
349
349
  leg.idealSplit = Math.round(selected.reduce(sum) / selected.length);
350
350
  if (leg.idealSplit < 0) {
351
- throw new Error("invalid ideal split calculated for leg " + code);
351
+ console.log("invalid ideal split calculated for leg " + code, leg.idealSplit);
352
+ leg.idealSplit = 30;
352
353
  }
353
354
  }
354
355
  // only if there are valid splits for this leg
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasifix/orienteering-utils",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "utility functions for orienteering result analyzis",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",