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 5e3a7c13b00b02b5dc0003b00ce2330872fd16e2
parent 368a8c90b2a575becc39bf7d53bbd8cf1e0b6a30
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Fri, 31 Mar 2023 23:46:30 +0200

fix(rate): startlist error

Diffstat:
Msrc/Rate.js | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/Rate.js b/src/Rate.js @@ -34,12 +34,10 @@ function RatingForm({session}) { const heatList = await supabase.from('heats').select() setHeats(heatList.data) - let startlist = {data: []} - startlist = await getStartlistForHeats([heatSelection.value]) + let startlist = await getStartlistForHeats([heatSelection.value]) - if (startlist.error !== null) { - return {data: []} - } + if (startlist.error) + return setAthleteOpts(startlist.data.map(s => { return {