Skip to content

Commit

Permalink
fix: non-date string crash in trainingCompensationEndDate (#2262)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikuke authored Sep 20, 2023
1 parent f7ceb74 commit 592c533
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,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 592c533

Please sign in to comment.