@overmap-ai/core 1.0.60-forms-removal.8 → 1.0.60-forms-removal.9

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.
@@ -2546,7 +2546,8 @@ const _selectLatestFormRevision = (formRevisions, formId) => {
2546
2546
  };
2547
2547
  const selectLatestFormRevisionOfForm = restructureCreateSelectorWithArgs(
2548
2548
  createSelector([selectFormRevisions, (_state, formId) => formId], (revisions, formId) => {
2549
- return revisions.filter((revision) => revision.form === formId).sort(formRevisionSortFn).pop();
2549
+ const sortedRevisions = revisions.filter((revision) => revision.form === formId).sort(formRevisionSortFn).reverse();
2550
+ return sortedRevisions.length > 0 ? sortedRevisions[0] : void 0;
2550
2551
  })
2551
2552
  );
2552
2553
  const selectFormRevisionsOfForm = restructureCreateSelectorWithArgs(