Skip to content

Commit

Permalink
tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brrusselburg committed Oct 23, 2024
1 parent fa3d985 commit 4cd7151
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ export default class UpcomingEventsList extends Component {

return data.reduce((result, item) => {
const startDate = moment(item.starts_at);
const endDate = moment(item.ends_at);
const endDate = item.ends_at ? moment(item.ends_at) : null;

if (!startDate.isSame(endDate)) {
if (endDate && !startDate.isSame(endDate)) {
while (startDate.isSameOrBefore(endDate, "day")) {
const year = startDate.year();
const month = startDate.month() + 1;
Expand Down

0 comments on commit 4cd7151

Please sign in to comment.