tods-competition-factory 1.7.13 → 1.7.14

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.
@@ -986,8 +986,9 @@ function decorateResult({
986
986
  if (result && Array.isArray(result?.stack) && typeof stack === "string") {
987
987
  result.stack.push(stack);
988
988
  }
989
- if (info && result?.error)
990
- result.error.info = info;
989
+ if (result && info) {
990
+ result.info = info;
991
+ }
991
992
  if (result && typeof context === "object" && Object.keys(context).length) {
992
993
  Object.assign(result, definedAttributes(context));
993
994
  }
@@ -1727,7 +1728,7 @@ function validateTieFormat(params) {
1727
1728
  const tieFormat = params?.tieFormat;
1728
1729
  const stack = "validateTieFormat";
1729
1730
  const errors = [];
1730
- if (typeof tieFormat !== "object") {
1731
+ if (!params || !tieFormat || typeof tieFormat !== "object") {
1731
1732
  errors.push("tieFormat must be an object");
1732
1733
  return decorateResult({
1733
1734
  result: {
@@ -1865,7 +1866,7 @@ function validateCollectionDefinition({
1865
1866
  errors.push(`collectionValue is not type number: ${collectionValue}`);
1866
1867
  }
1867
1868
  if (collectionValueProfiles) {
1868
- const result = validateCollectionValueProfile({
1869
+ const result = validateCollectionValueProfiles({
1869
1870
  collectionValueProfiles,
1870
1871
  matchUpCount
1871
1872
  });
@@ -1886,7 +1887,7 @@ function validateCollectionDefinition({
1886
1887
  return { errors, error: INVALID_OBJECT };
1887
1888
  return { valid: true };
1888
1889
  }
1889
- function validateCollectionValueProfile({
1890
+ function validateCollectionValueProfiles({
1890
1891
  collectionValueProfiles,
1891
1892
  matchUpCount
1892
1893
  }) {