diff --git a/src/nylas-spellchecker.coffee b/src/nylas-spellchecker.coffee index 16caf35f9..30736cf46 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.replace('_', '-') in dicts) or (lang.replace('-', '_') in dicts) isSpelledCorrectly: (args...) => not @isMisspelled(args...)