summaryrefslogtreecommitdiff
path: root/ext/bg/js/dictionary-importer.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/dictionary-importer.js')
-rw-r--r--ext/bg/js/dictionary-importer.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/dictionary-importer.js b/ext/bg/js/dictionary-importer.js
index 4374ff40..535756f7 100644
--- a/ext/bg/js/dictionary-importer.js
+++ b/ext/bg/js/dictionary-importer.js
@@ -17,13 +17,14 @@
/* global
* JSZip
- * JsonSchema
+ * JsonSchemaValidator
* mediaUtility
*/
class DictionaryImporter {
constructor() {
this._schemas = new Map();
+ this._jsonSchemaValidator = new JsonSchemaValidator();
}
async importDictionary(dictionaryDatabase, archiveSource, details, onProgress) {
@@ -241,7 +242,7 @@ class DictionaryImporter {
_validateJsonSchema(value, schema, fileName) {
try {
- JsonSchema.validate(value, schema);
+ this._jsonSchemaValidator.validate(value, schema);
} catch (e) {
throw this._formatSchemaError(e, fileName);
}