mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 15:46:28 +08:00
fix(spellchecker): add back in split call
Fixes the spec test when only the language (e.g. 'en') is supplied and still recognize the language.
This commit is contained in:
parent
8efb711bfe
commit
fab11f649d
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ class NylasSpellchecker
|
|||
isLanguageAvailable: (lang) =>
|
||||
return false unless lang
|
||||
dicts = @getAvailableDictionaries()
|
||||
return (lang in dicts) or (lang.replace('_', '-') in dicts) or (lang.replace('-', '_') 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...)
|
||||
|
||||
|
|
Loading…
Reference in a new issue