Fix loading dicts for hyphenation

This commit is contained in:
Ilya Kirillov
2025-07-03 02:04:40 +03:00
parent ee22e8e8b4
commit 88c84ad577

View File

@ -917,15 +917,15 @@ function onLoadFontsModule(window, undefined)
this._mapToNames = AscCommon.spellcheckGetLanguages();
let _langKey = "" + lang;
let _langName = this._mapToNames[_langKey];
if (_langName === undefined)
let _langObj = this._mapToNames[_langKey];
if (!_langObj || !_langObj["hyphen"] || !_langObj["name"])
{
this._dictionaries[_langKey] = false;
callback();
return;
}
this._loadDictionaryAttemt(_langKey, _langName, callback);
this._loadDictionaryAttemt(_langKey, _langObj["name"], callback);
};
this._loadDictionaryAttemt = function(langKey, langName, callback, currentAttempt)