fix(web): unrated movies show no rating

This commit is contained in:
Miguel Palhas
2026-08-24 00:01:17 +01:00
parent 9a03fc9963
commit b413718fd1
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1469,7 +1469,7 @@ function movieMain(board: HTMLElement, views: HideableView[]): MovieView {
hero.classList.add("has-backdrop");
hero.style.setProperty("--backdrop", `url("${backdropUrl}")`);
}
if (detail.vote_count > 0) {
if (detail.vote_average !== null) {
ratingEl.hidden = false;
ratingEl.append(starIcon(), document.createTextNode(`${formatRating(detail.vote_average)} `));
const votes = document.createElement("span");
+2 -1
View File
@@ -30,7 +30,8 @@ export interface MovieMetadata {
status: string;
poster_path: string | null;
backdrop_path: string | null;
vote_average: number;
/** `null` when TMDB has no votes for the title (#156). */
vote_average: number | null;
vote_count: number;
homepage: string | null;
imdb_id: string | null;