fix derive file style in constructor

This commit is contained in:
vcoppe
2024-10-05 17:40:25 +02:00
parent 72b0b5a706
commit ca51e1d788

View File

@@ -133,7 +133,7 @@ export class GPXFile extends GPXTreeNode<Track> {
}
if (gpx.hasOwnProperty('_data')) {
this._data = gpx._data;
}
if (!this._data.hasOwnProperty('style')) {
let style = this.getStyle();
let fileStyle = {};
@@ -150,7 +150,6 @@ export class GPXFile extends GPXTreeNode<Track> {
this.setStyle(fileStyle);
}
}
}
} else {
this.attributes = {};
this.metadata = {};