From 84fd4397c53dcbb0a6c282f9e6072a2dfcc674b1 Mon Sep 17 00:00:00 2001 From: basil-ahmed Date: Fri, 17 Nov 2023 20:43:12 -0500 Subject: [PATCH] Null Case Handler for Comments --- .../student/StudentIssueOverlay/DesktopIssueDetails.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front-end/src/components/student/StudentIssueOverlay/DesktopIssueDetails.js b/front-end/src/components/student/StudentIssueOverlay/DesktopIssueDetails.js index 2538366..edc79ea 100644 --- a/front-end/src/components/student/StudentIssueOverlay/DesktopIssueDetails.js +++ b/front-end/src/components/student/StudentIssueOverlay/DesktopIssueDetails.js @@ -210,13 +210,13 @@ const DesktopIssueDetails = ({ index }) => { {/* Map through the comments and display them starting with Update 2 */} - {issue.comments.map((update, index) => ( + {issue.comments[0] != null && (issue.comments.map((update, index) => (
{/* Updates in Reverse */}

Update {issue.comments.length - index}

{update}

- ))} + )))}
@@ -248,7 +248,7 @@ const DesktopIssueDetails = ({ index }) => { {issue.departments.map((dept, index) =>
  • {mapDepartmentToDisplayName(dept)}
  • )}
    - {issue.attachments.length > 1 && ( + {issue.attachments[0] != null && (

    Attachments