tods-competition-factory 1.6.20 → 1.6.21

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.
@@ -4224,10 +4224,9 @@ function isLucky({
4224
4224
  function isAdHoc({ drawDefinition, structure }) {
4225
4225
  if (!structure)
4226
4226
  return false;
4227
- const hasRoundPosition = structure?.matchUps?.find(
4228
- (matchUp) => matchUp?.roundPosition
4229
- );
4230
- const hasDrawPosition = structure?.matchUps?.find(
4227
+ const matchUps = structure.matchUps || structure.roundMatchUps && Object.values(structure.roundMatchUps).flat();
4228
+ const hasRoundPosition = matchUps?.find((matchUp) => matchUp?.roundPosition);
4229
+ const hasDrawPosition = matchUps?.find(
4231
4230
  (matchUp) => matchUp?.drawPositions?.length
4232
4231
  );
4233
4232
  return !structure?.structures && !(drawDefinition?.drawType && drawDefinition.drawType !== AD_HOC) && !hasRoundPosition && !hasDrawPosition;
@@ -4502,8 +4501,8 @@ function getAllStructureMatchUps({
4502
4501
  matchUpsMap,
4503
4502
  structureId
4504
4503
  }).drawPositionsRanges : void 0;
4505
- matchUps = matchUps.map(
4506
- (matchUp) => addMatchUpContext({
4504
+ matchUps = matchUps.map((matchUp) => {
4505
+ return addMatchUpContext({
4507
4506
  scheduleVisibilityFilters,
4508
4507
  sourceDrawPositionRanges,
4509
4508
  drawPositionsRanges,
@@ -4514,8 +4513,8 @@ function getAllStructureMatchUps({
4514
4513
  roundProfile,
4515
4514
  matchUp,
4516
4515
  event
4517
- })
4518
- );
4516
+ });
4517
+ });
4519
4518
  const matchUpTies = matchUps?.filter(
4520
4519
  (matchUp) => Array.isArray(matchUp.tieMatchUps)
4521
4520
  );