Skip to content

Commit f60c8e2

Browse files
committed
next not last meeting in series for my upcoming meetings
1 parent 5e14e68 commit f60c8e2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/frontend/src/utils/calendar.utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ export const eventsToNextEventInstance = (events: Event[]): EventInstance[] => {
191191
...event,
192192
scheduledTimes: [
193193
event.scheduledTimes.reduce((acc, current) => {
194-
if (current.startTime < acc.startTime) return acc;
195-
return current;
194+
if ((current.startTime < acc.startTime && current.startTime > now) || acc.startTime < now) return current;
195+
return acc;
196196
})
197197
]
198198
}));

0 commit comments

Comments
 (0)