From a351264b878b2660ae7a6415f26d38b52015c591 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Thu, 17 Oct 2024 12:37:19 +0200 Subject: [PATCH] fix: handle non-existent rottentomatoes rating (#1018) This fixes a bug where some media don't have any rottentomatoes ratings. --- 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 e86c24883..f4fbe12b4 100644 --- a/server/api/rating/rottentomatoes.ts +++ b/server/api/rating/rottentomatoes.ts @@ -182,7 +182,7 @@ class RottenTomatoes extends ExternalAPI { ); } - if (!tvshow) { + if (!tvshow || !tvshow.rottenTomatoes) { return null; }