summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLASER-Yi <[email protected]>2022-04-13 17:34:31 +0800
committerLASER-Yi <[email protected]>2022-04-13 17:34:31 +0800
commit10f121e442de944eb38ff8624c24bc1a0b9816a3 (patch)
tree0d4171cccd4b20c2b10ff0a37f16c5fc9d0628dc
parent2d2f4b19474013ecee26286d5fa959ade11022de (diff)
downloadbazarr-1.0.4-beta.22.tar.gz
bazarr-1.0.4-beta.22.zip
-rw-r--r--frontend/src/pages/Settings/Languages/modal.tsx20
1 files changed, 13 insertions, 7 deletions
diff --git a/frontend/src/pages/Settings/Languages/modal.tsx b/frontend/src/pages/Settings/Languages/modal.tsx
index 066418a76..ce807cceb 100644
--- a/frontend/src/pages/Settings/Languages/modal.tsx
+++ b/frontend/src/pages/Settings/Languages/modal.tsx
@@ -156,7 +156,7 @@ const LanguagesProfileModal: FunctionComponent<Props> = ({ update }) => {
onChange={(l) => {
if (l) {
item.language = l.code2;
- mutate(row.index, item);
+ mutate(row.index, { ...item, language: l.code2 });
}
}}
></LanguageSelector>
@@ -176,8 +176,10 @@ const LanguagesProfileModal: FunctionComponent<Props> = ({ update }) => {
id={BuildKey(item.id, item.language, "forced")}
checked={value === "True"}
onChange={(v) => {
- item.forced = v.target.checked ? "True" : "False";
- mutate(row.index, item);
+ mutate(row.index, {
+ ...item,
+ forced: v.target.checked ? "True" : "False",
+ });
}}
></Form.Check>
);
@@ -195,8 +197,10 @@ const LanguagesProfileModal: FunctionComponent<Props> = ({ update }) => {
id={BuildKey(item.id, item.language, "hi")}
checked={value === "True"}
onChange={(v) => {
- item.hi = v.target.checked ? "True" : "False";
- mutate(row.index, item);
+ mutate(row.index, {
+ ...item,
+ hi: v.target.checked ? "True" : "False",
+ });
}}
></Form.Check>
);
@@ -214,8 +218,10 @@ const LanguagesProfileModal: FunctionComponent<Props> = ({ update }) => {
id={BuildKey(item.id, item.language, "audio")}
checked={value === "True"}
onChange={(v) => {
- item.audio_exclude = v.target.checked ? "True" : "False";
- mutate(row.index, item);
+ mutate(row.index, {
+ ...item,
+ audio_exclude: v.target.checked ? "True" : "False",
+ });
}}
></Form.Check>
);