fixes missing expand for imported trails

This commit is contained in:
Christian Beutel
2024-04-03 22:50:14 +02:00
parent 8af1efaf20
commit 6847ef5f97

View File

@@ -151,6 +151,9 @@ export async function trails_search_bounding_box(northEast: LatLng, southWest: L
if (r.ok) {
for (const trail of response.items) {
const gpxData: string = await fetchGPX(trail);
if (!trail.expand) {
trail.expand = {};
}
trail.expand.gpx_data = gpxData;
}
@@ -182,6 +185,9 @@ export async function trails_show(id: string, loadGPX?: boolean, f: (url: Reques
response.expand = {}
}
const gpxData: string = await fetchGPX(response, f);
if (!response.expand) {
response.expand = {};
}
response.expand.gpx_data = gpxData;
}