From 534520794071d8530d6325460e61dabfcb46fbf0 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Mon, 23 Dec 2024 08:48:45 +0100 Subject: [PATCH] fix(ui): display Rotten Tomatoes for 0% ratings (#1178) The frontend was coercing the zero value to false. fix #1166 --- src/components/MovieDetails/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MovieDetails/index.tsx b/src/components/MovieDetails/index.tsx index 0b9a3b7ad..51036905e 100644 --- a/src/components/MovieDetails/index.tsx +++ b/src/components/MovieDetails/index.tsx @@ -780,13 +780,13 @@ const MovieDetails = ({ movie }: MovieDetailsProps) => {
{(!!data.voteCount || (ratingData?.rt?.criticsRating && - !!ratingData?.rt?.criticsScore) || + typeof ratingData?.rt?.criticsScore === 'number') || (ratingData?.rt?.audienceRating && !!ratingData?.rt?.audienceScore) || ratingData?.imdb?.criticsScore) && (
{ratingData?.rt?.criticsRating && - !!ratingData?.rt?.criticsScore && ( + typeof ratingData?.rt?.criticsScore === 'number' && (