Skip to content

Commit

Permalink
fix: split prefix from course
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlawson02 committed Oct 1, 2024
1 parent d30f226 commit fd8c943
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/frontend/src/components/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ export function Filters({ unfilteredProfessors, onUpdate, className }: FilterPro
selectedCoursePrefixs.map((coursePrefixFilter) => coursePrefixFilter.name),
);
const postCoursePrefixFilter = filteredResult.filter((professor) =>
professor.courses.some((course) => coursePrefixSet.has(course)),
professor.courses.some((course) => {
const prefix = course.split(" ")[0];
return coursePrefixSet.has(prefix);
}),
);
onUpdate(postCoursePrefixFilter);
} else {
Expand Down

0 comments on commit fd8c943

Please sign in to comment.