diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-04-29 08:52:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 06:52:22 +0000 |
commit | a479fd958dca56dfe669b872713289db40383cb2 (patch) | |
tree | 6681437930a0aa71af4d487d69abca3b5f85018f /src | |
parent | Fix Issue #1109: Expose relevant info about Electron, node, platform,… (#1309) (diff) | |
download | ferdium-app-a479fd958dca56dfe669b872713289db40383cb2.tar.gz ferdium-app-a479fd958dca56dfe669b872713289db40383cb2.tar.zst ferdium-app-a479fd958dca56dfe669b872713289db40383cb2.zip |
Fix spellcheckerLanguage array/string confusion (#1314)
Diffstat (limited to 'src')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 2 | ||||
-rw-r--r-- | src/webview/recipe.js | 12 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 0a82fff84..94c53fc90 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -267,7 +267,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
267 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, | 267 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, |
268 | showDragArea: settingsData.showDragArea, | 268 | showDragArea: settingsData.showDragArea, |
269 | enableSpellchecking: settingsData.enableSpellchecking, | 269 | enableSpellchecking: settingsData.enableSpellchecking, |
270 | spellcheckerLanguage: JSON.stringify(settingsData.spellcheckerLanguage), | 270 | spellcheckerLanguage: settingsData.spellcheckerLanguage, |
271 | beta: settingsData.beta, // we need this info in the main process as well | 271 | beta: settingsData.beta, // we need this info in the main process as well |
272 | automaticUpdates: settingsData.automaticUpdates, // we need this info in the main process as well | 272 | automaticUpdates: settingsData.automaticUpdates, // we need this info in the main process as well |
273 | locale: settingsData.locale, // we need this info in the main process as well | 273 | locale: settingsData.locale, // we need this info in the main process as well |
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index d29f3edbd..2319e8e2a 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -128,17 +128,7 @@ class RecipeController { | |||
128 | } | 128 | } |
129 | 129 | ||
130 | @computed get spellcheckerLanguage() { | 130 | @computed get spellcheckerLanguage() { |
131 | let selected; | 131 | const selected = this.settings.service.spellcheckerLanguage || this.settings.app.spellcheckerLanguage; |
132 | const langs = this.settings.service.spellcheckerLanguage || this.settings.app.spellcheckerLanguage; | ||
133 | if (typeof langs === 'string' && langs.substr(0, 1) === '[') { | ||
134 | // Value is JSON encoded | ||
135 | selected = JSON.parse(langs); | ||
136 | } else if (typeof langs === 'object') { | ||
137 | selected = langs; | ||
138 | } else { | ||
139 | selected = [langs]; | ||
140 | } | ||
141 | |||
142 | return selected; | 132 | return selected; |
143 | } | 133 | } |
144 | 134 | ||