fix export for gpx files with no attributes
This commit is contained in:
parent
63f3d63518
commit
e02a22eaea
1 changed files with 3 additions and 1 deletions
|
@ -96,7 +96,9 @@ export function buildGPX(file: GPXFile, exclude: string[]): string {
|
|||
},
|
||||
});
|
||||
|
||||
gpx.attributes.creator = gpx.attributes.creator ?? 'https://gpx.studio';
|
||||
if (!gpx.attributes)
|
||||
gpx.attributes = {};
|
||||
gpx.attributes['creator'] = gpx.attributes['creator'] ?? 'https://gpx.studio';
|
||||
gpx.attributes['version'] = '1.1';
|
||||
gpx.attributes['xmlns'] = 'http://www.topografix.com/GPX/1/1';
|
||||
gpx.attributes['xmlns:xsi'] = 'http://www.w3.org/2001/XMLSchema-instance';
|
||||
|
|
Loading…
Reference in a new issue