From 0cb8b5b49c7f06805150a0fe47d001ba84d585d2 Mon Sep 17 00:00:00 2001 From: Michael M Date: Sun, 22 May 2022 21:22:01 +0200 Subject: [PATCH] chore: add extra check before rendering --- frontend/components/projects/ProjectTile.tsx | 22 ++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/frontend/components/projects/ProjectTile.tsx b/frontend/components/projects/ProjectTile.tsx index 66b69354..97323b8e 100644 --- a/frontend/components/projects/ProjectTile.tsx +++ b/frontend/components/projects/ProjectTile.tsx @@ -817,12 +817,22 @@ const ProjectAssignmentsList: React.FC = ({ -

- {assignment.position.skill.skillName} -

-

- Suggested by {assignment.suggester.username} -

+ + {assignment && + assignment.position && + assignment.position.skill && + assignment.position.skill.skillName && ( +

+ {assignment.position.skill.skillName} +

+ )} + {assignment && + assignment.suggester && + assignment.suggester.username && ( +

+ Suggested by {assignment.suggester.username} +

+ )}