@overmap-ai/core 1.0.62-store-clear-fixes.0 → 1.0.62-store-clear-fixes.1

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.
@@ -2510,11 +2510,16 @@ var __publicField = (obj, key, value) => {
2510
2510
  };
2511
2511
  const selectFormSubmissionsOfForm = restructureCreateSelectorWithArgs(
2512
2512
  toolkit.createSelector(
2513
- [selectFormSubmissions, selectFormRevisionMapping, (_state, formId) => formId],
2513
+ [
2514
+ selectFormSubmissionsMapping,
2515
+ selectFormRevisionMapping,
2516
+ (_state, formId) => formId
2517
+ ],
2514
2518
  (submissions, revisionMapping, formId) => {
2515
- return submissions.filter((submission) => {
2516
- const revision = revisionMapping[submission.form_revision];
2517
- return (revision == null ? void 0 : revision.form) === formId;
2519
+ const revisionsOfForm = Object.values(revisionMapping).filter((revision) => revision.form === formId);
2520
+ const revisionIds = new Set(revisionsOfForm.map((revision) => revision.offline_id));
2521
+ return Object.values(submissions).filter((submission) => {
2522
+ return revisionIds.has(submission.form_revision);
2518
2523
  });
2519
2524
  }
2520
2525
  )