From 50fb06b23a502c3a108c2e17038e4bfe85cbcd59 Mon Sep 17 00:00:00 2001 From: LASER-Yi Date: Thu, 26 Aug 2021 20:11:33 +0800 Subject: [PATCH] Fix a issue that hi and forced is not properly updated on series subtitle upload modal --- frontend/src/components/modals/SeriesUploadModal.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/modals/SeriesUploadModal.tsx b/frontend/src/components/modals/SeriesUploadModal.tsx index dd5a9040e..6f6245905 100644 --- a/frontend/src/components/modals/SeriesUploadModal.tsx +++ b/frontend/src/components/modals/SeriesUploadModal.tsx @@ -90,14 +90,15 @@ const SeriesUploadModal: FunctionComponent = ({ const tasks = items .filter((v) => v.payload.instance !== undefined) .map((v) => { - const { code2, hi, forced } = v.language!; - const { sonarrEpisodeId: episodeid } = v.payload.instance!; + const { hi, forced, payload, language } = v; + const { code2 } = language!; + const { sonarrEpisodeId: episodeid } = payload.instance!; const form: FormType.UploadSubtitle = { file: v.file, language: code2, - hi: hi ?? false, - forced: forced ?? false, + hi: hi, + forced: forced, }; return createTask(