@sports-alliance/sports-lib 6.1.13 → 6.1.14
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.
|
@@ -153,7 +153,7 @@ class EventImporterSuuntoJSON {
|
|
|
153
153
|
// Create the activities
|
|
154
154
|
const activities = activityStartEventSamples.map((activityStartEventSample, index) => {
|
|
155
155
|
const activity = new activity_1.Activity(new Date(activityStartEventSample.TimeISO8601), activityStartEventSamples.length - 1 === index
|
|
156
|
-
? new Date(stopEventSample ? stopEventSample.TimeISO8601 : eventJSONObject.DeviceLog.Header.TimeISO8601)
|
|
156
|
+
? new Date(stopEventSample ? stopEventSample.TimeISO8601 : (eventJSONObject.DeviceLog.Header.TimeISO8601 || eventJSONObject.DeviceLog.Header.DateTime))
|
|
157
157
|
: new Date(activityStartEventSamples[index + 1].TimeISO8601), activity_types_1.ActivityTypes[(importer_suunto_activity_ids_1.ImporterSuuntoActivityIds[activityStartEventSample.Events[0].Activity.ActivityType])], creator, options);
|
|
158
158
|
// Set the end date to the stop event time if the activity is the last or the only one else set it on the next itery time
|
|
159
159
|
// Create the stats these are a 1:1 ref arrays
|
|
@@ -150,7 +150,7 @@ export class EventImporterSuuntoJSON {
|
|
|
150
150
|
// Create the activities
|
|
151
151
|
const activities = activityStartEventSamples.map((activityStartEventSample, index) => {
|
|
152
152
|
const activity = new Activity(new Date(activityStartEventSample.TimeISO8601), activityStartEventSamples.length - 1 === index
|
|
153
|
-
? new Date(stopEventSample ? stopEventSample.TimeISO8601 : eventJSONObject.DeviceLog.Header.TimeISO8601)
|
|
153
|
+
? new Date(stopEventSample ? stopEventSample.TimeISO8601 : (eventJSONObject.DeviceLog.Header.TimeISO8601 || eventJSONObject.DeviceLog.Header.DateTime))
|
|
154
154
|
: new Date(activityStartEventSamples[index + 1].TimeISO8601), ActivityTypes[(ImporterSuuntoActivityIds[activityStartEventSample.Events[0].Activity.ActivityType])], creator, options);
|
|
155
155
|
// Set the end date to the stop event time if the activity is the last or the only one else set it on the next itery time
|
|
156
156
|
// Create the stats these are a 1:1 ref arrays
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sports-alliance/sports-lib",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.14",
|
|
4
4
|
"description": "A Library to for importing / exporting and processing GPX, TCX, FIT and JSON files from services such as Strava, Movescount, Garmin, Polar etc",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gpx",
|