aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/backend.js5
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
)) {