Skip to content

Commit 04c14f8

Browse files
committed
Check if firstDay is null first
1 parent f9855f2 commit 04c14f8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/app/day/2026/components/schedule/schedule-list.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ export function ScheduleList({
143143

144144
const firstDay = Object.values(filteredSessions)[0]
145145
// if the first day has less than 3 sessions, it's probably a "day zero" with extra events or workshops
146-
const firstDayIsDayZero = Object.keys(firstDay).length < 3
146+
const firstDayIsDayZero =
147+
firstDay != null && Object.keys(firstDay).length < 3
147148
const startIndex = firstDayIsDayZero ? 0 : 1
148149

149150
const { getTimeMarker } = useCurrentTimeMarker(conferenceStart, conferenceEnd)

0 commit comments

Comments
 (0)