aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-06 15:49:07 -0500
committerGitHub <noreply@github.com>2021-03-06 15:49:07 -0500
commita65742a884223451324fcab5cfaeb6ebdfe32ec1 (patch)
treebe667001d9e7acf01b8126c94ece999fd9d20eec /ext
parentaa6a547da7a74e28dc290d8bef9f33500b82cd13 (diff)
Fix furigana distribution when reading starts with expression, but has remainder characters (#1496)
Diffstat (limited to 'ext')
-rw-r--r--ext/js/language/japanese-util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/language/japanese-util.js b/ext/js/language/japanese-util.js
index 4d317396..861d66e8 100644
--- a/ext/js/language/japanese-util.js
+++ b/ext/js/language/japanese-util.js
@@ -531,7 +531,7 @@ const JapaneseUtil = (() => {
_segmentizeFurigana(reading, readingNormalized, groups, groupsStart) {
const groupCount = groups.length - groupsStart;
if (groupCount <= 0) {
- return [];
+ return reading.length === 0 ? [] : null;
}
const group = groups[groupsStart];