aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/api.js2
-rw-r--r--ext/bg/js/translator.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 9751d4a1..f379e65a 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -83,7 +83,7 @@ async function apiTermsFind(text, optionsContext) {
async function apiKanjiFind(text, optionsContext) {
const options = await apiOptionsGet(optionsContext);
- const definitions = await utilBackend().translator.findKanji(text, dictEnabledSet(options));
+ const definitions = await utilBackend().translator.findKanji(text, options);
return definitions.slice(0, options.general.maxResults);
}
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index d33a2e27..1cdd79db 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -330,7 +330,8 @@ class Translator {
return deinflections;
}
- async findKanji(text, dictionaries) {
+ async findKanji(text, options) {
+ const dictionaries = dictEnabledSet(options);
const titles = Object.keys(dictionaries);
const kanjiUnique = {};
const kanjiList = [];