mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-24 16:14:01 +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
a559e41ba0
commit
6da8b2c824
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