Skip to content

Commit

Permalink
PR feedback addressed
Browse files Browse the repository at this point in the history
Co-authored-by: Pauline Conde <[email protected]>
  • Loading branch information
this-Aditya and mpgxvii authored Aug 23, 2024
1 parent 529ece8 commit 5c6b151
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions pages/study.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5c6b151

Please sign in to comment.