diff --git a/src/nylas-spellchecker.coffee b/src/nylas-spellchecker.coffee index 59f410373..cf4f06fa0 100644 --- a/src/nylas-spellchecker.coffee +++ b/src/nylas-spellchecker.coffee @@ -12,7 +12,7 @@ class NylasSpellchecker isLanguageAvailable: (lang) => return false unless lang dicts = @getAvailableDictionaries() - return (lang in dicts) or (lang.split(/[-_]/)[0] in dicts) + return (lang in dicts) or (lang.split(/[-_]/)[0] in dicts) or (lang.replace('_', '-') in dicts) or (lang.replace('-', '_') in dicts) isSpelledCorrectly: (args...) => not @isMisspelled(args...) @@ -76,7 +76,7 @@ class NylasSpellchecker getAvailableDictionaries: -> if process.platform is 'linux' arr = spellchecker.getAvailableDictionaries() - if not "en_US" in arr + if "en_US" not in arr arr.push('en_US') # Installed by default in node-spellchecker's vendor directory arr else