FIx a crash when opening the movie view with some missing subtitles

This commit is contained in:
Liang Yi 2021-08-16 16:41:00 +08:00
parent a2fc1d73dd
commit 6eb14a2754
1 changed files with 4 additions and 4 deletions

View File

@ -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) {