summaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/dictionary-import-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-07-31 10:53:35 -0400
committerGitHub <noreply@github.com>2021-07-31 10:53:35 -0400
commit2d57d69b9ed3adf1241074f7eb29a588bec817a2 (patch)
tree0c2b842d80dbb3324cef2f45fca5babe1eeb4014 /ext/js/pages/settings/dictionary-import-controller.js
parentb99850ed54ecaa903a4bd1c2bcf3ae1cd405a3ed (diff)
Improve dictionary importer (#1859)
* Optimize dictionary data parsing during import * Use ArrayBuffer instead of string * Add missing function for testing
Diffstat (limited to 'ext/js/pages/settings/dictionary-import-controller.js')
-rw-r--r--ext/js/pages/settings/dictionary-import-controller.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js
index a44b6625..db9a1a50 100644
--- a/ext/js/pages/settings/dictionary-import-controller.js
+++ b/ext/js/pages/settings/dictionary-import-controller.js
@@ -281,7 +281,7 @@ class DictionaryImportController {
const reader = new FileReader();
reader.onload = () => resolve(reader.result);
reader.onerror = () => reject(reader.error);
- reader.readAsBinaryString(file);
+ reader.readAsArrayBuffer(file);
});
}