Skip to content

Commit

Permalink
fixed the logic for numRatings in compare to only target non-GPA data
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiramTadepalli committed Nov 10, 2024
1 parent 51144fd commit 7c725b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/common/CompareTable/compareTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ function GradeOrRmpRow<T>({
</Skeleton>
)) ||
(value.state === 'done' &&
name !== 'GPA' &&
(value.data as RMPInterface).numRatings > 0 && ( // do not display RMP data (non-GPA data) if there are no reviews
(name !== 'GPA'
? (value.data as RMPInterface).numRatings > 0
: true) && ( // do not display RMP data (non-GPA data) if there are no reviews
<Tooltip
title={`${name}: ${formatValue(getValue(value.data))}`}
placement="top"
Expand Down

0 comments on commit 7c725b8

Please sign in to comment.