tods-competition-factory 1.6.11 → 1.6.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11494,7 +11494,7 @@ function getValidSeedBlocks({
11494
11494
  });
11495
11495
  const { positionAssignments } = structureAssignedDrawPositions({ structure });
11496
11496
  const positionsCount = positionAssignments?.length;
11497
- const seedsCount = seedAssignments?.length || 0;
11497
+ const seedsCount = seedAssignments?.length ?? 0;
11498
11498
  let allDrawPositions = [];
11499
11499
  const roundNumbers = Object.keys(roundMatchUps).map((n) => parseInt(n)).sort((a, b) => a - b);
11500
11500
  const uniqueDrawPositionsByRound = roundNumbers.map((roundNumber) => {
@@ -11756,7 +11756,7 @@ function getNextSeedBlock(params) {
11756
11756
  const seedsWithoutDrawPositions = seedAssignments?.filter(
11757
11757
  (assignment) => !assignment.participantId
11758
11758
  );
11759
- const seedsLeftToAssign = unplacedSeedAssignments?.length || seedsWithoutDrawPositions?.length;
11759
+ const seedsLeftToAssign = unplacedSeedAssignments?.length && unplacedSeedAssignments.length > 0 ? unplacedSeedAssignments.length : seedsWithoutDrawPositions?.length ?? 0;
11760
11760
  const unfilled = seedsLeftToAssign && nextSeedBlock?.drawPositions.filter(
11761
11761
  (drawPosition) => !assignedDrawPositions?.includes(drawPosition)
11762
11762
  ) || [];