Skip to content

Commit

Permalink
fix: handle non-existent rottentomatoes rating for movies (#1169)
Browse files Browse the repository at this point in the history
This fixes a bug where some movies don't have any rottentomatoes
ratings, which causes ratings from other services to not show
  • Loading branch information
benhaney authored Dec 20, 2024
1 parent 66a5ab4 commit 347a24a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/api/rating/rottentomatoes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class RottenTomatoes extends ExternalAPI {
movie = contentResults.hits.find((movie) => movie.title === name);
}

if (!movie) {
if (!movie?.rottenTomatoes) {
return null;
}

Expand Down

0 comments on commit 347a24a

Please sign in to comment.