Skip to content

Commit

Permalink
fix(Spell checking): Fix "undefined" language in context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
adlk committed Sep 27, 2019
1 parent 71831ec commit cc03883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webview/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ const buildMenuTpl = (props, suggestions, isSpellcheckEnabled, defaultSpellcheck
},
{
id: 'resetToDefault',
label: `Reset to system default (${SPELLCHECKER_LOCALES[defaultSpellcheckerLanguage]})`,
label: `Reset to system default (${defaultSpellcheckerLanguage === 'automatic' ? 'Automatic' : SPELLCHECKER_LOCALES[defaultSpellcheckerLanguage]})`,
type: 'radio',
visible: defaultSpellcheckerLanguage !== spellcheckerLanguage,
visible: defaultSpellcheckerLanguage !== spellcheckerLanguage || (defaultSpellcheckerLanguage !== 'automatic' && spellcheckerLanguage === 'automatic'),
click() {
debug('Resetting service spellchecker to system default');
ipcRenderer.sendToHost('set-service-spellchecker-language', 'reset');
Expand Down

0 comments on commit cc03883

Please sign in to comment.