diff options
author | 2021-04-29 08:52:22 +0200 | |
---|---|---|
committer | 2021-04-29 06:52:22 +0000 | |
commit | a479fd958dca56dfe669b872713289db40383cb2 (patch) | |
tree | 6681437930a0aa71af4d487d69abca3b5f85018f /src/webview/recipe.js | |
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/webview/recipe.js')
-rw-r--r-- | src/webview/recipe.js | 12 |
1 files changed, 1 insertions, 11 deletions
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 | ||