diff --git a/src/containers/tutor-home-page/subjects-step/SubjectsStep.tsx b/src/containers/tutor-home-page/subjects-step/SubjectsStep.tsx index 1a6a089bf..9b43b0f2b 100644 --- a/src/containers/tutor-home-page/subjects-step/SubjectsStep.tsx +++ b/src/containers/tutor-home-page/subjects-step/SubjectsStep.tsx @@ -44,10 +44,7 @@ const SubjectsStep = ({ btnsBox }: SubjectsStepProps) => { const fetchSubjectHandler = () => setSubjectIsFetched(true) const getSubjectsNames = useCallback( - () => - subjectService.getSubjectsNames( - subjects.category && subjects.category._id - ), + () => subjectService.getSubjectsNames(subjects.category?._id || null), [subjects.category] )