summaryrefslogtreecommitdiff
path: root/ext/bg/js/dictionary.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2020-01-26 11:29:30 -0800
committerAlex Yatskov <alex@foosoft.net>2020-01-26 11:29:30 -0800
commit0c5b9b1fa1599cbf769d96cdebc226310f9dd8bc (patch)
treee734e2c3005078dbc248b541d357a934baa8a116 /ext/bg/js/dictionary.js
parent2a12036ca305044291f1f4105d6a8d249848b210 (diff)
parent0cf1cf3aa094585bd6db8db2c1f229ba0ea37b6e (diff)
Merge branch 'master' into testing
Diffstat (limited to 'ext/bg/js/dictionary.js')
-rw-r--r--ext/bg/js/dictionary.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/dictionary.js b/ext/bg/js/dictionary.js
index 92adc532..67128725 100644
--- a/ext/bg/js/dictionary.js
+++ b/ext/bg/js/dictionary.js
@@ -67,7 +67,7 @@ function dictTermsSort(definitions, dictionaries=null) {
i = v2.source.length - v1.source.length;
if (i !== 0) { return i; }
- i = v2.reasons.length - v1.reasons.length;
+ i = v1.reasons.length - v2.reasons.length;
if (i !== 0) { return i; }
i = v2.score - v1.score;
@@ -147,8 +147,9 @@ function dictTermsGroup(definitions, dictionaries) {
definitions: groupDefs,
expression: firstDef.expression,
reading: firstDef.reading,
+ furiganaSegments: firstDef.furiganaSegments,
reasons: firstDef.reasons,
- termTags: groupDefs[0].termTags,
+ termTags: firstDef.termTags,
score: groupDefs.reduce((p, v) => v.score > p ? v.score : p, Number.MIN_SAFE_INTEGER),
source: firstDef.source
});