Skip to content

Commit

Permalink
Merge pull request RocketChat#88 from RocketChat/develop
Browse files Browse the repository at this point in the history
Only set spell check dictionary if there are dictionaries
  • Loading branch information
rodrigok committed Jan 26, 2016
2 parents d5a50bc + 38195be commit 6790e40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/scripts/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ try {

webFrame.setSpellCheckProvider((localStorage.getItem('userLanguage') || 'en'), false, {
spellCheck: function(text) {
if (localStorage.getItem('userLanguage')) {
if (localStorage.getItem('userLanguage') && checker.getAvailableDictionaries().length > 0) {
checker.setDictionary(localStorage.getItem('userLanguage'));
}

Expand Down

0 comments on commit 6790e40

Please sign in to comment.