tods-competition-factory 1.7.16 → 1.7.17

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.
@@ -17632,17 +17632,19 @@ function generateAndPopulatePlayoffStructures(params) {
17632
17632
  loserMatchUp
17633
17633
  }
17634
17634
  } = targetData;
17635
- const targetStructureId = loserTargetLink.target.structureId;
17636
- const targetDrawPosition = loserMatchUp.drawPositions[loserMatchUpDrawPositionIndex];
17637
- const result = assignDrawPositionBye({
17638
- drawPosition: targetDrawPosition,
17639
- structureId: targetStructureId,
17640
- tournamentRecord,
17641
- drawDefinition,
17642
- event
17643
- });
17644
- if (result.error)
17645
- console.log(result.error);
17635
+ if (loserTargetLink && loserMatchUp) {
17636
+ const targetStructureId = loserTargetLink.target.structureId;
17637
+ const targetDrawPosition = loserMatchUp.drawPositions[loserMatchUpDrawPositionIndex];
17638
+ const result = assignDrawPositionBye({
17639
+ drawPosition: targetDrawPosition,
17640
+ structureId: targetStructureId,
17641
+ tournamentRecord,
17642
+ drawDefinition,
17643
+ event
17644
+ });
17645
+ if (result.error)
17646
+ console.log(result.error);
17647
+ }
17646
17648
  });
17647
17649
  const matchUpModifications = [];
17648
17650
  const goesToMap = addGoesTo({