From 2e50dea71d2534372126d21b460f68cb3fb89b0f Mon Sep 17 00:00:00 2001 From: vcoppe Date: Wed, 4 Sep 2024 14:49:10 +0200 Subject: [PATCH] fix loading files without metadata --- gpx/src/gpx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpx/src/gpx.ts b/gpx/src/gpx.ts index 5116d49a..52468453 100644 --- a/gpx/src/gpx.ts +++ b/gpx/src/gpx.ts @@ -112,7 +112,7 @@ export class GPXFile extends GPXTreeNode{ super(); if (gpx) { this.attributes = gpx.attributes - this.metadata = gpx.metadata; + this.metadata = gpx.metadata ?? {}; this.metadata.author = { name: 'gpx.studio', link: {