tods-competition-factory 1.6.12 → 1.6.15

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.
@@ -2854,7 +2854,7 @@ function validMatchUp(matchUp) {
2854
2854
  const { matchUpId, drawPositions } = matchUp;
2855
2855
  const validMatchUpId = typeof matchUpId === "string";
2856
2856
  const validDrawPositions = !drawPositions || Array.isArray(drawPositions) && drawPositions.length <= 2 && drawPositions.every(
2857
- (dp) => isConvertableInteger(dp) || dp === void 0
2857
+ (dp) => isConvertableInteger(dp) || dp === void 0 || dp === null
2858
2858
  );
2859
2859
  return validMatchUpId && validDrawPositions;
2860
2860
  }
@@ -3689,9 +3689,10 @@ function getSourceDrawPositionRanges({
3689
3689
  structureId: sourceStructureId,
3690
3690
  matchUpsMap
3691
3691
  });
3692
- const { roundProfile } = getRoundMatchUps({
3692
+ const roundMatchUpsResult = getRoundMatchUps({
3693
3693
  matchUps: structureMatchUps2
3694
3694
  });
3695
+ const roundProfile = roundMatchUpsResult.roundProfile;
3695
3696
  return { [sourceStructureId]: roundProfile };
3696
3697
  })
3697
3698
  );
@@ -4333,7 +4334,7 @@ function getSide({
4333
4334
  sideNumber
4334
4335
  }) {
4335
4336
  const assignment = positionAssignments.find(
4336
- (assignment2) => assignment2.drawPosition === drawPosition
4337
+ (assignment2) => assignment2.drawPosition && assignment2.drawPosition === drawPosition
4337
4338
  );
4338
4339
  const participantId = drawPositionCollectionAssignment ? drawPositionCollectionAssignment[drawPosition]?.participantId : assignment?.participantId;
4339
4340
  const sideValue = assignment ? getSideValue({