Skip to content

Commit

Permalink
fix: better check for int
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Jan 17, 2024
1 parent 93021fe commit 398bdd5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export const PeerParticipationSummary = ({ quiz }: { quiz: HMSPoll }) => {
{ title: 'Avg. Time Taken', value: summary.avgTime },
{
title: 'Avg. Score',
value:
summary.avgScore === parseInt(summary.avgScore.toString()) ? summary.avgScore : summary.avgScore.toFixed(2),
value: Number.isInteger(summary.avgScore) ? summary.avgScore : summary.avgScore.toFixed(2),
},
]
: [
Expand Down

0 comments on commit 398bdd5

Please sign in to comment.