tods-competition-factory 2.2.37 → 2.2.38

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function factoryVersion() {
6
- return '2.2.37';
6
+ return '2.2.38';
7
7
  }
8
8
 
9
9
  const SINGLES_MATCHUP = 'SINGLES';
@@ -32566,10 +32566,18 @@ function parseScoreString({ tiebreakTo = 7, scoreString = '', matchUpFormat }) {
32566
32566
  winningSide = (side1Score > side2Score && 1) || (side1Score < side2Score && 2) || undefined;
32567
32567
  if (tiebreak) {
32568
32568
  const setTiebreakLowScore = tiebreak[1];
32569
+ let setSpecificTiebreakTo = tiebreakTo;
32570
+ if (parsedFormat) {
32571
+ const isDecidingSet = setNumber === bestOfSets;
32572
+ const setFormat = isDecidingSet && parsedFormat.finalSetFormat ? parsedFormat.finalSetFormat : parsedFormat.setFormat;
32573
+ if (setFormat?.tiebreakFormat?.tiebreakTo) {
32574
+ setSpecificTiebreakTo = setFormat.tiebreakFormat.tiebreakTo;
32575
+ }
32576
+ }
32569
32577
  const side1TiebreakPerspective = getTiebreakComplement({
32570
32578
  lowValue: setTiebreakLowScore,
32571
32579
  isSide1: winningSide === 2,
32572
- tiebreakTo,
32580
+ tiebreakTo: setSpecificTiebreakTo,
32573
32581
  });
32574
32582
  if (Array.isArray(side1TiebreakPerspective)) {
32575
32583
  [side1TiebreakScore, side2TiebreakScore] = side1TiebreakPerspective;