diff --git a/src/containers/edit-profile/professional-info-tab/add-professional-category-modal/AddProfessionalCategoryModal.tsx b/src/containers/edit-profile/professional-info-tab/add-professional-category-modal/AddProfessionalCategoryModal.tsx index 23e11ad66..5f5ffe7af 100644 --- a/src/containers/edit-profile/professional-info-tab/add-professional-category-modal/AddProfessionalCategoryModal.tsx +++ b/src/containers/edit-profile/professional-info-tab/add-professional-category-modal/AddProfessionalCategoryModal.tsx @@ -162,6 +162,13 @@ const AddProfessionalCategoryModal: FC = ({ _: SyntheticEvent, value: CategoryNameInterface | null ) => { + if (!value) { + handleDataChange({ + category: { _id: '', name: '' }, + subjects: [{ _id: '', name: '' }] + }) + return + } handleDataChange({ category: value, professionalSubjectTemplate }) }