Skip to content

Commit 78389a9

Browse files
authored
Merge pull request #2357 from gdg-x/tags
Handle undefined subsession
2 parents 39280d7 + f514eba commit 78389a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/src/schedule-generator/speakers-sessions-schedule-map.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function sessionsSpeakersScheduleMap(sessionsRaw, speakersRaw, scheduleRa
3333
for (let subSessionIndex = 0; subSessionIndex < subSessionsLen; subSessionIndex++) {
3434
const sessionId = timeslot.sessions[sessionIndex].items[subSessionIndex];
3535
const subsession = sessionsRaw[sessionId];
36-
const mainTag = pickMainTag(subsession.tags);
36+
const mainTag = pickMainTag(subsession?.tags);
3737
const endTime = calculateEndTime(
3838
subSessionsLen,
3939
timeslot,
@@ -51,7 +51,7 @@ export function sessionsSpeakersScheduleMap(sessionsRaw, speakersRaw, scheduleRa
5151
timeslot
5252
);
5353

54-
dayTags = combineTags(dayTags, subsession.tags);
54+
dayTags = combineTags(dayTags, subsession?.tags);
5555
scheduleTags = combineTags(scheduleTags, [mainTag]);
5656

5757
const finalSubSession = {

0 commit comments

Comments
 (0)