Skip to content

Commit

Permalink
refactor: suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Barsukov <nikita.s.barsukov@gmail.com>
  • Loading branch information
AndreiBelokopytov and nsbarsukov authored Feb 3, 2025
1 parent 076c728 commit e25440f
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ export function createMinMaxDatePostprocessor({
continue;
}

if (!parsedDate.year) {
parsedDate.year = LEAP_YEAR;
}

const date = segmentsToDate(parsedDate);
const date = segmentsToDate({year: LEAP_YEAR, ...parsedDate});

const clampedDate = clamp(date, min, max);

Expand Down

0 comments on commit e25440f

Please sign in to comment.