File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
course-matrix/frontend/src/pages/TimetableBuilder Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ const Calendar = React.memo<CalendarProps>(
236236 return ;
237237 }
238238 // Create course events for the newly created timetable
239- const newTimetableId = data ? .id ;
239+ const newTimetableId = data [ 0 ] . id ;
240240 for ( const offeringId of newOfferingIds ) {
241241 const { error : offeringError } = await createEvent ( {
242242 calendar_id : newTimetableId ,
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ export const GeneratedCalendars = React.memo<GeneratedCalendarsProps>(
133133 return ;
134134 }
135135 // Create course events for the newly created timetable
136- const newTimetableId = data ? .id ;
136+ const newTimetableId = data [ 0 ] . id ;
137137 for ( const offering of currentTimetableOfferings ) {
138138 const offeringId = offering . id ;
139139 const { error : offeringError } = await createEvent ( {
You can’t perform that action at this time.
0 commit comments