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.
@@ -6738,10 +6738,9 @@ function isLucky({
6738
6738
  function isAdHoc({ drawDefinition, structure }) {
6739
6739
  if (!structure)
6740
6740
  return false;
6741
- const hasRoundPosition = structure?.matchUps?.find(
6742
- (matchUp) => matchUp?.roundPosition
6743
- );
6744
- const hasDrawPosition = structure?.matchUps?.find(
6741
+ const matchUps = structure.matchUps || structure.roundMatchUps && Object.values(structure.roundMatchUps).flat();
6742
+ const hasRoundPosition = matchUps?.find((matchUp) => matchUp?.roundPosition);
6743
+ const hasDrawPosition = matchUps?.find(
6745
6744
  (matchUp) => matchUp?.drawPositions?.length
6746
6745
  );
6747
6746
  return !structure?.structures && !(drawDefinition?.drawType && drawDefinition.drawType !== AD_HOC) && !hasRoundPosition && !hasDrawPosition;
@@ -7017,8 +7016,8 @@ function getAllStructureMatchUps({
7017
7016
  matchUpsMap,
7018
7017
  structureId
7019
7018
  }).drawPositionsRanges : void 0;
7020
- matchUps = matchUps.map(
7021
- (matchUp) => addMatchUpContext({
7019
+ matchUps = matchUps.map((matchUp) => {
7020
+ return addMatchUpContext({
7022
7021
  scheduleVisibilityFilters,
7023
7022
  sourceDrawPositionRanges,
7024
7023
  drawPositionsRanges,
@@ -7029,8 +7028,8 @@ function getAllStructureMatchUps({
7029
7028
  roundProfile,
7030
7029
  matchUp,
7031
7030
  event
7032
- })
7033
- );
7031
+ });
7032
+ });
7034
7033
  const matchUpTies = matchUps?.filter(
7035
7034
  (matchUp) => Array.isArray(matchUp.tieMatchUps)
7036
7035
  );