48b877c439
Pre-allocate fileResults[idx] slots so GPX files always concatenate in URL order regardless of fetch arrival order (Bug 1). Both .then and .catch now call computeDistance() after decrementing pending so a failed last fetch no longer leaves the distance element permanently blank (Bug 2). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM