aboutsummaryrefslogtreecommitdiff
path: root/ext/js/language
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-14 18:04:19 -0400
committerGitHub <noreply@github.com>2021-03-14 18:04:19 -0400
commit52a4d874eada5be121e15d73d1d10e9a8d84bdb8 (patch)
tree0a8c2afe9ac507701b954c0510c3f38d14d999a0 /ext/js/language
parent06b02c3cf2ce725383f9a0bae87d3ef084ed8809 (diff)
Make MediaUtil a static class (#1525)
Diffstat (limited to 'ext/js/language')
-rw-r--r--ext/js/language/dictionary-importer.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/js/language/dictionary-importer.js b/ext/js/language/dictionary-importer.js
index c23a93e3..b4429315 100644
--- a/ext/js/language/dictionary-importer.js
+++ b/ext/js/language/dictionary-importer.js
@@ -25,7 +25,6 @@ class DictionaryImporter {
constructor() {
this._schemas = new Map();
this._jsonSchemaValidator = new JsonSchemaValidator();
- this._mediaUtil = new MediaUtil();
}
async importDictionary(dictionaryDatabase, archiveSource, details, onProgress) {
@@ -325,7 +324,7 @@ class DictionaryImporter {
}
const content = await file.async('base64');
- const mediaType = this._mediaUtil.getImageMediaTypeFromFileName(path);
+ const mediaType = MediaUtil.getImageMediaTypeFromFileName(path);
if (mediaType === null) {
throw new Error(`Could not determine media type for image at path ${JSON.stringify(path)} for ${errorSource}`);
}