mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-13 22:56:05 -05:00
Fix one more place match.pos -> num
This commit is contained in:
@@ -32,7 +32,7 @@ export function DuringMatchActions({
|
||||
const currentPosition =
|
||||
currentMatch.score?.reduce((acc, cur) => acc + cur, 1) ?? 1;
|
||||
const currentStage = currentRound.stages.find(
|
||||
(m) => m.position === currentPosition
|
||||
(s) => s.position === currentPosition
|
||||
);
|
||||
invariant(currentStage, "currentStage is undefined");
|
||||
const { stage } = currentStage;
|
||||
|
||||
@@ -405,11 +405,8 @@ function newParticipantsForMatches({
|
||||
.find(({ id }) => id === match.loserDestinationMatchId);
|
||||
invariant(losersMatch, "losersMatch undefined");
|
||||
|
||||
// TODO: probably this is not correct: https://github.com/Sendouc/sendou.ink/issues/819
|
||||
// not sure where position = 0 comes from
|
||||
// ---
|
||||
// if the match will have a BYE then we need to generate one more participant
|
||||
if (losersMatch.position === 0) {
|
||||
if (losersMatch.number === 0) {
|
||||
invariant(
|
||||
losersMatch.winnerDestinationMatchId,
|
||||
"losersMatch.winnerDestinationMatchId undefined"
|
||||
|
||||
Reference in New Issue
Block a user