From 5c6b151ec4cac5dec5e6c16d422365fed85c6f43 Mon Sep 17 00:00:00 2001 From: Aditya Mishra <98681758+this-Aditya@users.noreply.github.com> Date: Fri, 23 Aug 2024 20:47:59 +0530 Subject: [PATCH] PR feedback addressed Co-authored-by: Pauline Conde --- pages/study.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pages/study.tsx b/pages/study.tsx index 38d84b8..dfdee46 100644 --- a/pages/study.tsx +++ b/pages/study.tsx @@ -121,14 +121,9 @@ export const getServerSideProps: GetServerSideProps = async (context) => { const studyDefinitions: string | undefined = await githubService.initiateFetch(projectId, REMOTE_DEFINITIONS_CONFIG.STUDY_INFO_DEFINITION_FILE_NAME_CONTENT, REMOTE_DEFINITIONS_CONFIG.STUDY_INFO_VERSION) - if (studyDefinitions == undefined) return {props: {projectExists: true}} - - return { - props: { - definitions: studyDefinitions, - projectExists: true - } - } +return studyDefinitions === undefined + ? { props: { projectExists: true } } + : { props: { definitions: studyDefinitions, projectExists: true } } } catch (error: any) { if (error instanceof MPFetchError || error instanceof ContentLengthError || error instanceof NoContentError) { return {