diff --git a/web/src/lib/models/gpx/gpx.ts b/web/src/lib/models/gpx/gpx.ts index ed364e5d..8ccd01bb 100644 --- a/web/src/lib/models/gpx/gpx.ts +++ b/web/src/lib/models/gpx/gpx.ts @@ -195,6 +195,12 @@ export default class GPX { } const heightResponse: ValhallaHeightResponse = await r2.json() + const heights = heightResponse.height ?? []; + const finiteHeights = heights.filter((height) => Number.isFinite(height)).length; + + if (heights.length > 0 && finiteHeights === 0) { + return; + } let heightIndex = 0; for (const track of this.trk ?? []) {