summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-11-04 20:13:03 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-11-10 14:02:43 -0500
commit58c099799940fce56c7a57ce566c522c7eb0eb12 (patch)
tree05bb5213d0de1fa67af93e157dc0a15fd1c1055e /ext/bg
parentaf1662acadbfb7a96e06257a9dfad71ed6e2c478 (diff)
Give findKanji the same API as findTerms
Diffstat (limited to 'ext/bg')
-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 = [];