diff options
author | LASER-Yi <[email protected]> | 2022-06-01 20:42:59 +0800 |
---|---|---|
committer | LASER-Yi <[email protected]> | 2022-06-01 20:42:59 +0800 |
commit | 059ab59fc7cea7abdcc34b6fab16e5aac25e41dd (patch) | |
tree | de707c3bc172415fefe96b152e857ffc76b79bbb | |
parent | cf15c26f1b65a7d2faf5d4ebe503eb2d0b6a2461 (diff) | |
download | bazarr-059ab59fc7cea7abdcc34b6fab16e5aac25e41dd.tar.gz bazarr-059ab59fc7cea7abdcc34b6fab16e5aac25e41dd.zip |
Fix crash when saving language profiles
-rw-r--r-- | frontend/src/pages/Settings/components/Layout.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/frontend/src/pages/Settings/components/Layout.tsx b/frontend/src/pages/Settings/components/Layout.tsx index fba9012a8..5e6949a28 100644 --- a/frontend/src/pages/Settings/components/Layout.tsx +++ b/frontend/src/pages/Settings/components/Layout.tsx @@ -64,14 +64,16 @@ const Layout: FunctionComponent<Props> = (props) => { const { settings, storages } = values; if (Object.keys(settings).length > 0) { - submitHooks(settings); - LOG("info", "submitting settings", settings); - mutate(settings); + const settingsToSubmit = { ...settings }; + submitHooks(settingsToSubmit); + LOG("info", "submitting settings", settingsToSubmit); + mutate(settingsToSubmit); } if (Object.keys(storages).length > 0) { - LOG("info", "submitting storages", storages); - updateStorage(storages); + const storagesToSubmit = { ...storages }; + LOG("info", "submitting storages", storagesToSubmit); + updateStorage(storagesToSubmit); } }, [mutate, updateStorage] |