Skip to content

Commit

Permalink
Merge pull request #1267 from topcoder-platform/hotfix/parse-review-s…
Browse files Browse the repository at this point in the history
…cores

Parse score to float before executing toFixed()
  • Loading branch information
ThomasKranitsas authored Jan 12, 2022
2 parents f138cca + 66accb3 commit 28f66ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ChallengeEditor/Submissions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,11 @@ class SubmissionsComponent extends React.Component {
<div className={styles['col-5']}>
<a href={`${SUBMISSION_REVIEW_APP_URL}/${challenge.legacyId}/submissions/${s.id} `} target='_blank'>
{!_.isEmpty(s.review) && s.review[0].score
? s.review[0].score.toFixed(2)
? parseFloat(s.review[0].score).toFixed(2)
: 'N/A'}
&zwnj; &zwnj;/ &zwnj;
{s.reviewSummation && s.reviewSummation[0].aggregateScore
? s.reviewSummation[0].aggregateScore.toFixed(2)
? parseFloat(s.reviewSummation[0].aggregateScore).toFixed(2)
: 'N/A'}
</a>
</div>
Expand Down

0 comments on commit 28f66ac

Please sign in to comment.