tods-competition-factory 2.0.57 → 2.0.58

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.0.57';
6
+ return '2.0.58';
7
7
  }
8
8
 
9
9
  function isFunction(obj) {
@@ -21211,8 +21211,10 @@ function attemptToModifyScore(params) {
21211
21211
  const { matchUpStatusCodes, matchUpStatus, structure, matchUp, dualMatchUp, inContextMatchUp } = params;
21212
21212
  const matchUpStatusIsValid = isDirectingMatchUpStatus({ matchUpStatus }) ||
21213
21213
  ([CANCELLED$1, ABANDONED$1].includes(matchUpStatus) && dualMatchUp);
21214
+ const participantsCount = matchUp?.sides?.map((side) => side.participantId).filter(Boolean).length ||
21215
+ inContextMatchUp?.sides?.map((side) => side.participantId).filter(Boolean).length;
21214
21216
  const stack = 'attemptToModifyScore';
21215
- const hasAdHocSides = isAdHoc({ structure }) && matchUp?.sides?.every((side) => side.participantId);
21217
+ const hasAdHocSides = (isAdHoc({ structure }) && participantsCount === 1) || (matchUpStatus === DEFAULTED && participantsCount);
21216
21218
  const validToScore = hasAdHocSides ||
21217
21219
  drawPositionsAssignedParticipantIds({ structure, matchUp, inContextMatchUp }) ||
21218
21220
  params.appliedPolicies?.[POLICY_TYPE_SCORING]?.requireParticipantsForScoring === false;