Skip to content

Commit

Permalink
fix: course.enrolled check for undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJustChew committed Aug 19, 2024
1 parent fed9f05 commit 1a24917
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Courses/CourseTagsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const CourseTagList = ({ course }: { course: CourseDefinition }) => {
{(course.reserve ?? 0) > 0 && <>{` 保 ${course.reserve}`}</>}
</span>
</HighlightItem>
{course.enrolled && (
{course.enrolled != undefined && (
<HighlightItem className="bg-violet-50 text-violet-900 dark:bg-violet-950 dark:text-violet-100">
<span className="">{`${course.enrolled} 選上 `}</span>
</HighlightItem>
Expand Down

0 comments on commit 1a24917

Please sign in to comment.