Fix a bug with GPX export

This commit is contained in:
Lucas Verney 2018-08-20 13:57:14 +02:00
parent 017bf34ca5
commit acaed37f3b

View File

@ -110,7 +110,7 @@ export default {
const waypoint = Object.assign({}, item, { timestamp: new Date(item.timestamp) }); const waypoint = Object.assign({}, item, { timestamp: new Date(item.timestamp) });
[courseKey, eleKey, hdopKey, speedKey, vdopKey].forEach((key) => { [courseKey, eleKey, hdopKey, speedKey, vdopKey].forEach((key) => {
if (waypoint[key] === null || waypoint[key] === undefined) { if (waypoint[key] === null || waypoint[key] === undefined) {
delete waypoint.elevation; delete waypoint[key];
} }
}); });
waypoints.push(waypoint); waypoints.push(waypoint);