Skip to content

Commit

Permalink
fix: prevent crash when stage filter is used and program is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott committed Dec 29, 2023
1 parent 75a6fed commit ca615cb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ const ProgramDimensionsFilter = ({
{[OUTPUT_TYPE_ENROLLMENT, OUTPUT_TYPE_TRACKED_ENTITY].includes(
useSelector(sGetUiInputType)
) &&
dimensionType === DIMENSION_TYPE_DATA_ELEMENT && (
dimensionType === DIMENSION_TYPE_DATA_ELEMENT &&
(!stageFilter ||
program?.programStages.some(
(stage) => stage.id === stageFilter
)) && (
<StageFilter
stages={program?.programStages}
selected={stageFilter}
Expand Down

0 comments on commit ca615cb

Please sign in to comment.