From e411cc009f29a832938c9bff6f316b63b5a148fd Mon Sep 17 00:00:00 2001 From: Oliver Braun Date: Wed, 8 Jan 2025 07:34:49 +0100 Subject: [PATCH] fix: previous commit --- src/routes/nta/ntaWithRegs/+page.server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/nta/ntaWithRegs/+page.server.js b/src/routes/nta/ntaWithRegs/+page.server.js index 296ea07..fcf9b5b 100644 --- a/src/routes/nta/ntaWithRegs/+page.server.js +++ b/src/routes/nta/ntaWithRegs/+page.server.js @@ -71,7 +71,11 @@ export async function load({ params }) { (e) => console.log(e); }); - if (roomData != null && roomData.plannedRoomForStudent.room != null) { + if ( + roomData != null && + roomData.plannedRoomForStudent != null && + roomData.plannedRoomForStudent.room != null + ) { data.generatedExam.roomName = roomData.plannedRoomForStudent.room.name; }