tods-competition-factory 1.9.0 → 1.9.1

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.
@@ -918,6 +918,11 @@ const extractAttributes = (accessor) => (element) => !accessor || typeof element
918
918
  })) || typeof accessor === "object" && Object.keys(accessor).map((key) => ({
919
919
  [key]: getAccessorValue({ element, accessor: key })?.value
920
920
  })) || (typeof accessor === "string" && getAccessorValue({ element, accessor }))?.value;
921
+ function getDefinedKeys(obj, ignoreValues, ignoreEmptyArrays) {
922
+ return Object.keys(obj).filter(
923
+ (key) => !ignoreValues.includes(obj[key]) && (!ignoreEmptyArrays || (Array.isArray(obj[key]) ? obj[key].length : true))
924
+ );
925
+ }
921
926
  function definedAttributes(obj, ignoreFalse, ignoreEmptyArrays, shallow) {
922
927
  if (typeof obj !== "object" || obj === null)
923
928
  return obj;
@@ -927,9 +932,7 @@ function definedAttributes(obj, ignoreFalse, ignoreEmptyArrays, shallow) {
927
932
  const ignoreValues = ["", void 0, null];
928
933
  if (ignoreFalse)
929
934
  ignoreValues.push(false);
930
- const definedKeys = Object.keys(obj).filter(
931
- (key) => !ignoreValues.includes(obj[key]) && (!ignoreEmptyArrays || (Array.isArray(obj[key]) ? obj[key].length : true))
932
- );
935
+ const definedKeys = getDefinedKeys(obj, ignoreValues, ignoreEmptyArrays);
933
936
  return Object.assign(
934
937
  {},
935
938
  ...definedKeys.map((key) => {
@@ -13049,18 +13052,14 @@ function conditionallyAdvanceDrawPosition(params) {
13049
13052
  } else {
13050
13053
  sourceSideNumber = 2;
13051
13054
  }
13052
- } else {
13053
- if (targetMatchUp.feedRound) {
13054
- if (sourceMatchUp.structureId === targetMatchUp.structureId) {
13055
- sourceSideNumber = 2;
13056
- } else {
13057
- sourceSideNumber = 1;
13058
- }
13055
+ } else if (targetMatchUp.feedRound) {
13056
+ if (sourceMatchUp.structureId === targetMatchUp.structureId) {
13057
+ sourceSideNumber = 2;
13059
13058
  } else {
13060
- if (walkoverWinningSide)
13061
- sourceSideNumber = 3 - walkoverWinningSide;
13059
+ sourceSideNumber = 1;
13062
13060
  }
13063
- }
13061
+ } else if (walkoverWinningSide)
13062
+ sourceSideNumber = 3 - walkoverWinningSide;
13064
13063
  }
13065
13064
  const sourceMatchUpStatus = params.matchUpStatus;
13066
13065
  const pairedMatchUpStatus = pairedPreviousMatchUp?.matchUpStatus;