Fix if statement

This commit is contained in:
adam-skowronek 2022-11-17 23:37:05 +01:00
parent 22815bb405
commit b2dfccf869

View File

@ -220,7 +220,10 @@ const Schedule = () => {
) )
useEffect(() => { useEffect(() => {
if (scheduleData) { if (
scheduleData?.start_date_for_enrollment_students &&
scheduleData?.end_date_for_enrollment_students
) {
setStartDate(new Date(scheduleData.start_date_for_enrollment_students)) setStartDate(new Date(scheduleData.start_date_for_enrollment_students))
setEndDate(new Date(scheduleData.end_date_for_enrollment_students)) setEndDate(new Date(scheduleData.end_date_for_enrollment_students))
} }