@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.
@@ -1842,13 +1842,13 @@ const selectComponentTypeStagesMapping = restructureCreateSelectorWithArgs(
1842
1842
  createSelector(
1843
1843
  [selectStageMapping, (_state, componentTypeId) => componentTypeId],
1844
1844
  (stagesMapping, componentTypeId) => {
1845
- const stagesMappingCopy = { ...stagesMapping };
1846
- for (const stage in stagesMappingCopy) {
1847
- if (stagesMappingCopy[stage].component_type !== componentTypeId) {
1848
- delete stagesMappingCopy[stage];
1845
+ const componentTypeStagesMapping = {};
1846
+ for (const [stageId, stage] of Object.entries(stagesMapping)) {
1847
+ if (stage.component_type === componentTypeId) {
1848
+ componentTypeStagesMapping[stageId] = stage;
1849
1849
  }
1850
1850
  }
1851
- return stagesMappingCopy;
1851
+ return componentTypeStagesMapping;
1852
1852
  }
1853
1853
  )
1854
1854
  );