Skip to content

Commit 1cf3a87

Browse files
Copilotjkachel
andcommitted
Use explicit === true check for hyl_choice field values
Agent-Logs-Url: https://github.com/mitodl/mit-learn/sessions/ed6a7a47-f467-48eb-be2a-464691b2fe77 Co-authored-by: jkachel <945611+jkachel@users.noreply.github.com>
1 parent f475a54 commit 1cf3a87

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

frontends/main/src/app-pages/ProductPages/HowYoullLearnSection.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ const HowYoullLearnSection: React.FC<{
150150
page: CoursePageItem | ProgramPageItem
151151
}> = ({ page }) => {
152152
const filteredOptions = HOW_YOULL_LEARN_OPTIONS.filter(
153-
(option) => (page as Record<HylChoiceKey, boolean>)[option.name],
153+
(option) =>
154+
(page as Record<HylChoiceKey, boolean | undefined>)[option.name] === true,
154155
)
155156
return filteredOptions.length > 0 ? (
156157
<HowYoullLearnRoot aria-labelledby={HeadingIds.How}>

0 commit comments

Comments
 (0)