From 60e0f4db41f3507dd3bd4a08add59922ab426f40 Mon Sep 17 00:00:00 2001
From: Albin Henriksson <albhe428@student.liu.se>
Date: Wed, 21 Apr 2021 12:56:09 +0200
Subject: [PATCH] Fix tests

---
 client/src/pages/presentationEditor/PresentationEditorPage.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/src/pages/presentationEditor/PresentationEditorPage.tsx b/client/src/pages/presentationEditor/PresentationEditorPage.tsx
index 01e80a3a..bd854980 100644
--- a/client/src/pages/presentationEditor/PresentationEditorPage.tsx
+++ b/client/src/pages/presentationEditor/PresentationEditorPage.tsx
@@ -134,7 +134,7 @@ const PresentationEditorPage: React.FC = () => {
   }
 
   const renderSlideIcon = (slide: RichSlide) => {
-    switch (slide.questions[0].type_id) {
+    switch (slide.questions && slide.questions[0].type_id) {
       case 0:
         return <InfoOutlinedIcon></InfoOutlinedIcon> // information slide
       case 1:
-- 
GitLab