diff --git a/src/shared/types/CourseSchedule.ts b/src/shared/types/CourseSchedule.ts index 68b753086..968ace7ae 100644 --- a/src/shared/types/CourseSchedule.ts +++ b/src/shared/types/CourseSchedule.ts @@ -72,10 +72,12 @@ export class CourseSchedule { days, startTime, endTime, - location: { - building: location[0] ?? '', - room: location[1] ?? '', - }, + location: location[0] + ? { + building: location[0], + room: location[1] ?? '', + } + : undefined, } satisfies Serialized); } catch (e) { throw new Error(`Failed to parse schedule: ${dayLine} ${timeLine} ${locLine}`);