From a2b891a9c67060bf85af235697c30669b8282096 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Tue, 2 Apr 2024 00:28:21 +0000 Subject: [PATCH] Fix test --- .../SubmissionManagement/Submission/index.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shared/components/SubmissionManagement/Submission/index.jsx b/src/shared/components/SubmissionManagement/Submission/index.jsx index fb3b0231f..c4ed0f70a 100644 --- a/src/shared/components/SubmissionManagement/Submission/index.jsx +++ b/src/shared/components/SubmissionManagement/Submission/index.jsx @@ -43,11 +43,11 @@ export default function Submission(props) { // Determine if a challenge is for Topcrowd so we can edit the UI accordingly let isTopCrowdChallenge = false; - const isTopCrowdChallengeData = _.find(challenge.metadata, { name: 'is_platform' }); - if (isTopCrowdChallengeData) { - isTopCrowdChallenge = isTopCrowdChallengeData.value; - } else { - isTopCrowdChallenge = false; + if (challenge) { + const isTopCrowdChallengeData = _.find(challenge.metadata, { name: 'is_platform' }); + if (isTopCrowdChallengeData) { + isTopCrowdChallenge = isTopCrowdChallengeData.value; + } } return (