diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-31 18:08:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 18:08:51 -0400 |
commit | 01c5c5c04bd9234c64d6f57ee0ea65b0f478a1b7 (patch) | |
tree | f262b7042bd56fc9b72efb7b42d97341efd50df9 /ext/js/language/dictionary-importer-worker.js | |
parent | 1d6e437fb284a591fc1b7f4aec87bbc7cde5367f (diff) |
Dictionary importer refactoring (#1867)
* Remove map of schemas
* Don't reuse dictionary importer instances
* Refactor
* Update how progress callback is used
Diffstat (limited to 'ext/js/language/dictionary-importer-worker.js')
-rw-r--r-- | ext/js/language/dictionary-importer-worker.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/language/dictionary-importer-worker.js b/ext/js/language/dictionary-importer-worker.js index f44a10f9..014b6542 100644 --- a/ext/js/language/dictionary-importer-worker.js +++ b/ext/js/language/dictionary-importer-worker.js @@ -64,8 +64,8 @@ class DictionaryImporterWorker { async _importDictionary(archiveContent, importDetails, onProgress) { const dictionaryDatabase = await this._getPreparedDictionaryDatabase(); try { - const dictionaryImporter = new DictionaryImporter(this._mediaLoader); - const {result, errors} = await dictionaryImporter.importDictionary(dictionaryDatabase, archiveContent, importDetails, onProgress); + const dictionaryImporter = new DictionaryImporter(this._mediaLoader, onProgress); + const {result, errors} = await dictionaryImporter.importDictionary(dictionaryDatabase, archiveContent, importDetails); return { result, errors: errors.map((error) => serializeError(error)) |