tods-competition-factory 1.9.3 → 1.9.5

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.
@@ -1210,6 +1210,7 @@ const extractAttributes = (accessor) => (element) => !accessor || typeof element
1210
1210
  })) || typeof accessor === "object" && Object.keys(accessor).map((key) => ({
1211
1211
  [key]: getAccessorValue({ element, accessor: key })?.value
1212
1212
  })) || (typeof accessor === "string" && getAccessorValue({ element, accessor }))?.value;
1213
+
1213
1214
  function getDefinedKeys(obj, ignoreValues, ignoreEmptyArrays) {
1214
1215
  return Object.keys(obj).filter(
1215
1216
  (key) => !ignoreValues.includes(obj[key]) && (!ignoreEmptyArrays || (Array.isArray(obj[key]) ? obj[key].length : true))
@@ -23857,8 +23858,7 @@ function generateDrawDefinition(params) {
23857
23858
  }
23858
23859
  }
23859
23860
  const policiesToAttach = {
23860
- [POLICY_TYPE_AVOIDANCE]: appliedPolicies[POLICY_TYPE_AVOIDANCE],
23861
- ...POLICY_SEEDING_DEFAULT
23861
+ [POLICY_TYPE_AVOIDANCE]: appliedPolicies[POLICY_TYPE_AVOIDANCE]
23862
23862
  };
23863
23863
  if (policyDefinitions) {
23864
23864
  if (typeof policyDefinitions !== "object") {
@@ -23882,6 +23882,10 @@ function generateDrawDefinition(params) {
23882
23882
  attachPolicies({ drawDefinition, policyDefinitions: policiesToAttach });
23883
23883
  }
23884
23884
  if (!appliedPolicies[POLICY_TYPE_SEEDING] && !policyDefinitions[POLICY_TYPE_SEEDING]) {
23885
+ attachPolicies({
23886
+ drawDefinition,
23887
+ policyDefinitions: POLICY_SEEDING_DEFAULT
23888
+ });
23885
23889
  Object.assign(appliedPolicies, POLICY_SEEDING_DEFAULT);
23886
23890
  }
23887
23891
  let structureId = existingDrawDefinition?.structures?.find(