From ff1449c01e5ef104e02d6b78aeb66a2c6f377d79 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 7 May 2023 00:50:09 -0500 Subject: [PATCH] Fixed: Index UI crash for movies without files --- .../src/Movie/Index/ProgressBar/MovieIndexProgressBar.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/Movie/Index/ProgressBar/MovieIndexProgressBar.tsx b/frontend/src/Movie/Index/ProgressBar/MovieIndexProgressBar.tsx index a38058845..78514ef17 100644 --- a/frontend/src/Movie/Index/ProgressBar/MovieIndexProgressBar.tsx +++ b/frontend/src/Movie/Index/ProgressBar/MovieIndexProgressBar.tsx @@ -49,14 +49,10 @@ function MovieIndexProgressBar(props: MovieIndexProgressBarProps) { movieStatus = 'Missing'; if (hasFile) { - const quality = movieFile.quality; - - movieStatus = quality.quality.name; + movieStatus = movieFile?.quality?.quality.name ?? 'Downloaded'; } } else if (hasFile) { - const quality = movieFile.quality; - - movieStatus = quality.quality.name; + movieStatus = movieFile?.quality?.quality.name ?? 'Downloaded'; } else if (isAvailable && !hasFile) { movieStatus = 'Missing'; } else {