tods-competition-factory 1.6.20 → 1.6.22

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.
@@ -5522,10 +5522,9 @@ function isLucky({
5522
5522
  function isAdHoc({ drawDefinition, structure }) {
5523
5523
  if (!structure)
5524
5524
  return false;
5525
- const hasRoundPosition = structure?.matchUps?.find(
5526
- (matchUp) => matchUp?.roundPosition
5527
- );
5528
- const hasDrawPosition = structure?.matchUps?.find(
5525
+ const matchUps = structure.matchUps || structure.roundMatchUps && Object.values(structure.roundMatchUps).flat();
5526
+ const hasRoundPosition = matchUps?.find((matchUp) => matchUp?.roundPosition);
5527
+ const hasDrawPosition = matchUps?.find(
5529
5528
  (matchUp) => matchUp?.drawPositions?.length
5530
5529
  );
5531
5530
  return !structure?.structures && !(drawDefinition?.drawType && drawDefinition.drawType !== AD_HOC) && !hasRoundPosition && !hasDrawPosition;
@@ -5800,8 +5799,8 @@ function getAllStructureMatchUps({
5800
5799
  matchUpsMap,
5801
5800
  structureId
5802
5801
  }).drawPositionsRanges : void 0;
5803
- matchUps = matchUps.map(
5804
- (matchUp) => addMatchUpContext({
5802
+ matchUps = matchUps.map((matchUp) => {
5803
+ return addMatchUpContext({
5805
5804
  scheduleVisibilityFilters,
5806
5805
  sourceDrawPositionRanges,
5807
5806
  drawPositionsRanges,
@@ -5812,8 +5811,8 @@ function getAllStructureMatchUps({
5812
5811
  roundProfile,
5813
5812
  matchUp,
5814
5813
  event
5815
- })
5816
- );
5814
+ });
5815
+ });
5817
5816
  const matchUpTies = matchUps?.filter(
5818
5817
  (matchUp) => Array.isArray(matchUp.tieMatchUps)
5819
5818
  );