diff --git a/gpx/src/gpx.ts b/gpx/src/gpx.ts index a78203d9..4aa7dcf1 100644 --- a/gpx/src/gpx.ts +++ b/gpx/src/gpx.ts @@ -192,8 +192,8 @@ export class GPXFile extends GPXTreeNode{ toGPXFileType(): GPXFileType { return { - attributes: this.attributes, - metadata: this.metadata, + attributes: cloneJSON(this.attributes), + metadata: cloneJSON(this.metadata), wpt: this.wpt, trk: this.trk.map((track) => track.toTrackType()) };