diff --git a/gpx/src/io.ts b/gpx/src/io.ts index 72b2d9ca..84b82e86 100644 --- a/gpx/src/io.ts +++ b/gpx/src/io.ts @@ -62,7 +62,7 @@ export function parseGPX(gpxData: string): GPXFile { } export function buildGPX(file: GPXFile, exclude: string[]): string { - const gpx = removeEmptyElements(file.toGPXFileType(exclude)); + const gpx = file.toGPXFileType(exclude); const builder = new XMLBuilder({ format: true, @@ -99,7 +99,7 @@ export function buildGPX(file: GPXFile, exclude: string[]): string { encoding: "UTF-8", } }, - gpx + gpx: removeEmptyElements(gpx) }); }