tods-competition-factory 1.8.42 → 1.8.43

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.
@@ -13689,7 +13689,10 @@ function getPlayoffRoundsRanges({ playoffSourceRounds, roundProfile }) {
13689
13689
  return { playoffRoundsRanges };
13690
13690
  }
13691
13691
 
13692
- function getAvailablePlayoffProfiles({ drawDefinition, structureId }) {
13692
+ function getAvailablePlayoffProfiles({
13693
+ drawDefinition,
13694
+ structureId
13695
+ }) {
13693
13696
  if (!drawDefinition)
13694
13697
  return { error: MISSING_DRAW_DEFINITION };
13695
13698
  const { matchUps, matchUpsMap } = allDrawMatchUps({
@@ -13826,7 +13829,7 @@ function availablePlayoffProfiles({
13826
13829
  ).length;
13827
13830
  if (playoffRounds && availableToProgress === targetRoundMatchUps.length) {
13828
13831
  playoffRounds.push(roundNumber);
13829
- const loser = roundProfile?.[roundNumber].finishingPositionRange?.loser;
13832
+ const loser = roundProfile?.[roundNumber]?.finishingPositionRange?.loser;
13830
13833
  if (loser) {
13831
13834
  const minFinishingPosition = Math.min(...loser);
13832
13835
  const maxFinishingPosition = minFinishingPosition + availableToProgress;