@overmap-ai/core 1.0.48-form-submission-view.1 → 1.0.48-form-submission-view.2

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.
@@ -1833,13 +1833,13 @@ var __publicField = (obj, key, value) => {
1833
1833
  toolkit.createSelector(
1834
1834
  [selectStageMapping, (_state, componentTypeId) => componentTypeId],
1835
1835
  (stagesMapping, componentTypeId) => {
1836
- const stagesMappingCopy = { ...stagesMapping };
1837
- for (const stage in stagesMappingCopy) {
1838
- if (stagesMappingCopy[stage].component_type !== componentTypeId) {
1839
- delete stagesMappingCopy[stage];
1836
+ const componentTypeStagesMapping = {};
1837
+ for (const [stageId, stage] of Object.entries(stagesMapping)) {
1838
+ if (stage.component_type === componentTypeId) {
1839
+ componentTypeStagesMapping[stageId] = stage;
1840
1840
  }
1841
1841
  }
1842
- return stagesMappingCopy;
1842
+ return componentTypeStagesMapping;
1843
1843
  }
1844
1844
  )
1845
1845
  );