add track name when exporting file with a single track

This commit is contained in:
vcoppe
2024-07-17 23:30:02 +02:00
parent b51961bfe5
commit 555cc50e7d

View File

@@ -96,6 +96,10 @@ export function buildGPX(file: GPXFile): string {
}
};
if (gpx.trk.length === 1 && (gpx.trk[0].name === undefined || gpx.trk[0].name === '')) {
gpx.trk[0].name = gpx.metadata.name;
}
return builder.build({
"?xml": {
attributes: {