diff --git a/web/src/lib/models/gpx/gpx.ts b/web/src/lib/models/gpx/gpx.ts index 3727799f..c1119018 100644 --- a/web/src/lib/models/gpx/gpx.ts +++ b/web/src/lib/models/gpx/gpx.ts @@ -280,6 +280,7 @@ export default class GPX { const builder = new xml2js.Builder(options) const gpx = new GPX(this); + (gpx as any).features = undefined allDatesToISOString(gpx); let xmlString = builder.buildObject(gpx); diff --git a/web/src/routes/trail/edit/[id]/+page.svelte b/web/src/routes/trail/edit/[id]/+page.svelte index eefb34b9..2ccb814c 100644 --- a/web/src/routes/trail/edit/[id]/+page.svelte +++ b/web/src/routes/trail/edit/[id]/+page.svelte @@ -1061,8 +1061,8 @@ }); } - function updateTrailOnMap() { - const t = { ...$formData } as Trail; + function updateTrailOnMap() { + const t: Trail = JSON.parse(JSON.stringify($formData)); t.expand!.gpx = valhallaStore.route; mapTrail = [t]; }