Have "simple seeded list" get all teams if none checked in yet

Previous behavior just looks broken to users.
Proper fix is still just making a more robust
team export.
This commit is contained in:
Kalle 2026-04-26 14:55:05 +03:00
parent a221dcbd71
commit 2865fc3415

View File

@ -589,6 +589,10 @@ function DownloadParticipants() {
}
function simpleListInSeededOrder() {
const hasCheckedInTeams = tournament.ctx.teams.some(
(team) => team.checkIns.length > 0,
);
return tournament.ctx.teams
.slice()
.sort(
@ -596,7 +600,7 @@ function DownloadParticipants() {
(a.seed ?? Number.POSITIVE_INFINITY) -
(b.seed ?? Number.POSITIVE_INFINITY),
)
.filter((team) => team.checkIns.length > 0)
.filter((team) => !hasCheckedInTeams || team.checkIns.length > 0)
.map((team) => team.name)
.join("\n");
}