Skip to content

Commit

Permalink
Removed unnecessary non-null assertion (#2689)
Browse files Browse the repository at this point in the history
  • Loading branch information
Made1ra authored Nov 14, 2024
1 parent 42ffd91 commit edc988a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ const ProficiencyLevelSelect: FC<ProficiencyLevelSelectProps> = ({
>
<Checkbox checked={value.indexOf(checkbox) > -1} />
<ListItemText
primary={labels?.has(checkbox) ? t(labels.get(checkbox)!) : t(checkbox)}
primary={
labels?.has(checkbox) ? t(labels.get(checkbox) || '') : t(checkbox)
}
/>
</MenuItem>
))
Expand All @@ -75,7 +77,7 @@ const ProficiencyLevelSelect: FC<ProficiencyLevelSelectProps> = ({

const renderSelectedValue = (selected: ProficiencyLevelEnum[]) => {
const translatedValues = selected.map((level) =>
labels?.has(level) ? t(labels.get(level)!) : t(level)
labels?.has(level) ? t(labels.get(level) || '') : t(level)
)

return fillRange && selected.length > 1
Expand Down

0 comments on commit edc988a

Please sign in to comment.