Skip to content

Commit

Permalink
fix(ui): display Rotten Tomatoes for 0% ratings (#1178)
Browse files Browse the repository at this point in the history
The frontend was coercing the zero value to false.

fix #1166
  • Loading branch information
gauthier-th authored Dec 23, 2024
1 parent f505503 commit 5345207
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/MovieDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -780,13 +780,13 @@ const MovieDetails = ({ movie }: MovieDetailsProps) => {
<div className="media-facts">
{(!!data.voteCount ||
(ratingData?.rt?.criticsRating &&
!!ratingData?.rt?.criticsScore) ||
typeof ratingData?.rt?.criticsScore === 'number') ||
(ratingData?.rt?.audienceRating &&
!!ratingData?.rt?.audienceScore) ||
ratingData?.imdb?.criticsScore) && (
<div className="media-ratings">
{ratingData?.rt?.criticsRating &&
!!ratingData?.rt?.criticsScore && (
typeof ratingData?.rt?.criticsScore === 'number' && (
<Tooltip
content={intl.formatMessage(messages.rtcriticsscore)}
>
Expand Down

0 comments on commit 5345207

Please sign in to comment.