From 52cfbb7d15083996add1dd29eb00c80e8fbca47c Mon Sep 17 00:00:00 2001 From: ollibowers <80164276+ollibowers@users.noreply.github.com> Date: Fri, 12 Jul 2024 20:54:48 +1000 Subject: [PATCH] fix: boolean check to ensure types pass --- frontend/src/pages/DegreeWizard/YearStep/YearStep.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/DegreeWizard/YearStep/YearStep.tsx b/frontend/src/pages/DegreeWizard/YearStep/YearStep.tsx index 894a7f2bb..69418dff2 100644 --- a/frontend/src/pages/DegreeWizard/YearStep/YearStep.tsx +++ b/frontend/src/pages/DegreeWizard/YearStep/YearStep.tsx @@ -20,7 +20,7 @@ type Props = { // Disable 10 years from the selected date const disable10YearsOnwards: DatePickerProps['disabledDate'] = (current, { from }) => { - return from && Math.abs(current.year() - from.year()) >= 10; + return from !== undefined && Math.abs(current.year() - from.year()) >= 10; }; const YearStep = ({ incrementStep, setDegreeInfo }: Props) => {