Skip to content

Commit

Permalink
fix: non-date string crash in trainingCompensationEndDate
Browse files Browse the repository at this point in the history
  • Loading branch information
rikuke committed Sep 7, 2023
1 parent 6489e30 commit 263e0d5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,12 @@ const SalaryBenefitCalculatorView: React.FC<
setNewTrainingCompensation((prevValue) => ({
...prevValue,
endDate:
getCorrectEndDate(prevValue.startDate, value).toString() ??
getCorrectEndDate(prevValue.startDate, value)?.toString() ??
'',
}))
}
value={convertToUIDateFormat(newTrainingCompensation.endDate)}
invalid={!!getErrorMessage(fields.trainingCompensationEndDate.name)}
invalid={!!fields.trainingCompensationEndDate && !!getErrorMessage(fields.trainingCompensationEndDate.name)}
aria-invalid={!!getErrorMessage(fields.trainingCompensationEndDate.name)}
errorText={getErrorMessage(fields.trainingCompensationEndDate.name)}
style={{ paddingRight: `${theme.spacing.s}` }}
Expand Down

0 comments on commit 263e0d5

Please sign in to comment.