Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
carkom committed Oct 25, 2024
1 parent 47e9e5e commit 12c77cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type DateRangeProps = {

function checkDate(date: string) {
const dateParsed = monthUtils.parseDate(date);
if (dateParsed.toString() !== 'Invalid Date') {
if (dateParsed) {
return d.format(dateParsed, 'yyyy-MM-dd');
} else {
return null;
Expand Down

0 comments on commit 12c77cb

Please sign in to comment.