Skip to content

Commit

Permalink
fix: render optionality units when there are 2 of them
Browse files Browse the repository at this point in the history
  • Loading branch information
kimon-satan committed Sep 12, 2024
1 parent e97c0f9 commit fc6d3df
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@ export const PupilUnitsSection = ({
optionalityUnit[0],
optionalityUnit[0].supplementaryData.unitOrder,
);
} else if (optionalityUnit.length === 2) {
// 2 optionalities, doesn't need sublistings but the unit with optionality should be used for the title.
const unit = optionalityUnit.find(
(unit) => unit.programmeFields.optionality,
);
if (unit)
return renderListItem(unit, unit.supplementaryData.unitOrder);
} else {
// More than 2 optionalities and therefore needs sublistings
if (optionalityUnit[0])
Expand Down

0 comments on commit fc6d3df

Please sign in to comment.