diff options
author | Liang Yi <[email protected]> | 2021-08-16 16:41:00 +0800 |
---|---|---|
committer | Liang Yi <[email protected]> | 2021-08-16 16:41:00 +0800 |
commit | 6eb14a27542f4cd2da4a4576cbd6e96a9dc5fb57 (patch) | |
tree | 0f11d1db7db2b11ebe9087e5dc7daba7d075d2d9 | |
parent | a2fc1d73ddd0b6ac54cf17827d03ce7e90c3095a (diff) | |
download | bazarr-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.tsx | 8 |
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) { |