diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-04-14 21:25:02 +0300 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-04-14 21:25:02 +0300 |
commit | 619df42aedaa8da97d0a16d539b7211349143a0a (patch) | |
tree | 32f4977ba09a5deb6769eec9d913aff85d6b4847 /ext/bg/js | |
parent | 3fa8b8e1866933fdfccd0598a11e443fc1693840 (diff) |
simplify to enable constant usage
Diffstat (limited to 'ext/bg/js')
-rw-r--r-- | ext/bg/js/backend.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 960c65bf..f8b0fc96 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -349,11 +349,10 @@ class Backend { for (const [mecabName, parsedLines] of Object.entries(rawResults)) { const result = []; for (const parsedLine of parsedLines) { - for (let {expression, reading, source} of parsedLine) { + for (const {expression, reading, source} of parsedLine) { const term = []; - if (expression === '') { expression = source; } for (const {text: text2, furigana} of jp.distributeFuriganaInflected( - expression, + expression.length > 0 ? expression : source, jp.convertKatakanaToHiragana(reading), source )) { |