Skip to content

Commit 7762fe7

Browse files
fix(subject-select): intersect org subject options
1 parent 1b2f2da commit 7762fe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/subject-select/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function SubjectSelect({
5151
// @see {@link https://github.com/tutorbookapp/tutorbook/issues/133}
5252
const { org } = useOrg();
5353
const options = useMemo(() => {
54-
if (org?.subjects) return intersection(org?.subjects, subjectOptions);
54+
if (org?.subjects) return intersection(org?.subjects, subjectOptions, (a: Subject, b: Subject) => a.id === b.id);
5555
return subjectOptions;
5656
}, [org?.subjects, subjectOptions]);
5757
const placeholder = useMemo(() => {

0 commit comments

Comments
 (0)