fixed date range

This commit is contained in:
J-onasJones 2024-08-27 18:35:58 +02:00
parent 4e94fa0566
commit 610937910c

View file

@ -44,8 +44,8 @@
: release.types) === selectedRelease || : release.types) === selectedRelease ||
release.types.includes(selectedRelease); release.types.includes(selectedRelease);
const dateMatch = const dateMatch =
(!startDate || new Date(release.date) >= startDate) && (!startDate || new Date(release.date) >= new Date(startDate)) &&
(!endDate || new Date(release.date) <= endDate); (!endDate || new Date(release.date) <= new Date(endDate));
return artistMatch && titleMatch && releaseTypeMatch && dateMatch; return artistMatch && titleMatch && releaseTypeMatch && dateMatch;
}); });