Skip to content

Commit

Permalink
fix: boolean check in term planner to ensure types pass (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
ollibowers authored Jul 12, 2024
1 parent 843f718 commit f142dab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/DegreeWizard/YearStep/YearStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit f142dab

Please sign in to comment.