summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLiang Yi <[email protected]>2021-08-16 16:41:00 +0800
committerLiang Yi <[email protected]>2021-08-16 16:41:00 +0800
commit6eb14a27542f4cd2da4a4576cbd6e96a9dc5fb57 (patch)
tree0f11d1db7db2b11ebe9087e5dc7daba7d075d2d9
parenta2fc1d73ddd0b6ac54cf17827d03ce7e90c3095a (diff)
downloadbazarr-6eb14a27542f4cd2da4a4576cbd6e96a9dc5fb57.tar.gz
bazarr-6eb14a27542f4cd2da4a4576cbd6e96a9dc5fb57.zip
FIx a crash when opening the movie view with some missing subtitles
-rw-r--r--frontend/src/Movies/Detail/table.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/Movies/Detail/table.tsx b/frontend/src/Movies/Detail/table.tsx
index dfbf6fac5..621bfa231 100644
--- a/frontend/src/Movies/Detail/table.tsx
+++ b/frontend/src/Movies/Detail/table.tsx
@@ -102,10 +102,10 @@ const Table: FunctionComponent<Props> = ({ movie, profile }) => {
);
const data: Subtitle[] = useMemo(() => {
- const missing = movie.missing_subtitles.map((item) => {
- item.path = missingText;
- return item;
- });
+ const missing = movie.missing_subtitles.map((item) => ({
+ ...item,
+ path: missingText
+ }));
let raw_subtitles = movie.subtitles;
if (onlyDesired) {