@overmap-ai/core 1.0.51-bulk-form-submission.2 → 1.0.51-bulk-form-submission.4

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.
@@ -3645,12 +3645,12 @@ const selectLatestFormRevisionsOfComponentTypes = restructureCreateSelectorWithA
3645
3645
  const ret = {};
3646
3646
  for (const form of Object.values(userForms)) {
3647
3647
  if (form.component_type && componentTypeIdsSet.has(form.component_type)) {
3648
- formsOfComponentTypes[form.component_type] = form;
3648
+ formsOfComponentTypes[form.offline_id] = form;
3649
3649
  }
3650
3650
  }
3651
3651
  for (const revision of Object.values(revisions)) {
3652
3652
  const form = formsOfComponentTypes[revision.form];
3653
- if (!form || !form.component_type || !ret[form.component_type] || formRevisionSortFn(ret[form.component_type], revision) < 0)
3653
+ if (!form || !form.component_type || ret[form.component_type] && formRevisionSortFn(ret[form.component_type], revision) > 0)
3654
3654
  continue;
3655
3655
  ret[form.component_type] = revision;
3656
3656
  }