skip elevation correction if no valid height information returned by valhalla (#821)

This commit is contained in:
slothful-vassal
2026-02-19 16:43:04 +01:00
committed by GitHub
parent c8af897cdd
commit ff10084ba0

View File

@@ -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 ?? []) {