From 347a24a97b354725c4ccb3b5a07793b96ff60b80 Mon Sep 17 00:00:00 2001 From: Ben Haney <31331498+benhaney@users.noreply.github.com> Date: Fri, 20 Dec 2024 04:23:14 -0600 Subject: [PATCH] fix: handle non-existent rottentomatoes rating for movies (#1169) This fixes a bug where some movies don't have any rottentomatoes ratings, which causes ratings from other services to not show --- server/api/rating/rottentomatoes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/rating/rottentomatoes.ts b/server/api/rating/rottentomatoes.ts index f4fbe12b..170cbb64 100644 --- a/server/api/rating/rottentomatoes.ts +++ b/server/api/rating/rottentomatoes.ts @@ -128,7 +128,7 @@ class RottenTomatoes extends ExternalAPI { movie = contentResults.hits.find((movie) => movie.title === name); } - if (!movie) { + if (!movie?.rottenTomatoes) { return null; }