From 7e78eeee5845d640a28c8024a5979137ea228219 Mon Sep 17 00:00:00 2001 From: Ben Haney Date: Fri, 20 Dec 2024 00:48:01 -0600 Subject: [PATCH] fix: handle non-existent rottentomatoes rating for movies 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 f4fbe12b4..170cbb64f 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; }