aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-04-24 18:59:29 -0700
committerAlex Yatskov <alex@foosoft.net>2016-04-24 18:59:29 -0700
commitcac6fc1427106420b28777d94907bf27ab1995a3 (patch)
treee8ab59bed16d7e2ba1ed887ffb2b9ccee510f9a9 /ext/bg/js/translator.js
parenta192a8d8b549d5979a427d86c51f94bb5f4be907 (diff)
Basic kanji output
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index 6be80581..606f6ec5 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -131,11 +131,11 @@ class Translator {
}
findKanji(text) {
- let results = [];
-
+ let results = [];
const processed = {};
+
for (const c of text) {
- if (!processed.has(c)) {
+ if (!processed[c]) {
results = results.concat(this.dictionary.findKanji(c));
processed[c] = true;
}