myheats

Live heats, scoring and leaderboard for sport events
git clone https://git.in0rdr.ch/myheats.git
Log | Files | Refs | Pull requests | README | LICENSE

commit 4e96d2d49541f54c1a22f9643c86970cfc9c97ac
parent 3c894b5f5cdac4b986641f149b6e21d372d4bb26
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Mon, 23 Sep 2024 22:11:36 +0200

fix(scoring): error handling

Diffstat:
Msrc/frontend/Score.jsx | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/frontend/Score.jsx b/src/frontend/Score.jsx @@ -67,9 +67,11 @@ function ScoringForm({session}) { } setHeats(data) - const startlist = await getStartlistForHeats([heatSelection.value]) - - if (startlist.error) { + let startlist = undefined + try { + startlist = await getStartlistForHeats([heatSelection.value]) + } catch (error) { + console.error(error) setLoading(false) return }