Skip to content

Commit abd8d01

Browse files
authored
Fix optional chaining for event status check
1 parent c4bf6b3 commit abd8d01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/backend/src/services/calendar.services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ export default class CalendarService {
14211421

14221422
if (!event) throw new NotFoundException('Event', eventId);
14231423
if (event.dateDeleted) throw new DeletedException('Event', eventId);
1424-
if (event?.status === Event_Status.SCHEDULED) {
1424+
if (event.status === Event_Status.SCHEDULED) {
14251425
const timeSlots = await prisma.schedule_Slot.findMany({
14261426
where: { eventId: event.eventId }
14271427
});

0 commit comments

Comments
 (0)