@overmap-ai/core 1.0.61 → 1.0.62-store-clear-fixes.0
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.
|
@@ -2323,10 +2323,17 @@ var __publicField = (obj, key, value) => {
|
|
|
2323
2323
|
return ret;
|
|
2324
2324
|
};
|
|
2325
2325
|
const selectLatestFormRevisionOfForm = restructureCreateSelectorWithArgs(
|
|
2326
|
-
toolkit.createSelector(
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2326
|
+
toolkit.createSelector(
|
|
2327
|
+
[selectFormRevisionMapping, (_state, formId) => formId],
|
|
2328
|
+
(revisions, formId) => {
|
|
2329
|
+
const revisionsOfForm = Object.values(revisions).filter((revision) => revision.form === formId);
|
|
2330
|
+
if (revisionsOfForm.length === 0)
|
|
2331
|
+
return void 0;
|
|
2332
|
+
const sortedRevisions = revisionsOfForm.sort(formRevisionSortFn);
|
|
2333
|
+
const latestRevision = sortedRevisions[revisionsOfForm.length - 1];
|
|
2334
|
+
return revisions[latestRevision.offline_id];
|
|
2335
|
+
}
|
|
2336
|
+
)
|
|
2330
2337
|
);
|
|
2331
2338
|
const selectFormRevisionsOfForm = restructureCreateSelectorWithArgs(
|
|
2332
2339
|
toolkit.createSelector(
|