Skip to content

Commit

Permalink
Merge pull request #531 from opentargets/rm-evidence-unavailable-trials
Browse files Browse the repository at this point in the history
Unavailable clinical trials start dates seem to be displayed incorrectly as 1970 #2528 Add check for null value and add nalabel for null values
  • Loading branch information
remo87 committed Apr 11, 2022
2 parents a073c83 + 7bec5d7 commit 72bf5ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sections/evidence/Chembl/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,16 @@ const columns = [
<>{clinicalStatus}</>
)
) : (
'N/A'
naLabel
);
},
},
{
id: 'studyStartDate',
label: 'Start Date',
numeric: true,
renderCell: ({ studyStartDate }) => new Date(studyStartDate).getFullYear(),
renderCell: ({ studyStartDate }) =>
studyStartDate ? new Date(studyStartDate).getFullYear() : naLabel,
},
{
label: 'Source',
Expand Down

0 comments on commit 72bf5ca

Please sign in to comment.