diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-04-01 11:05:28 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-04-01 11:05:28 -0700 |
commit | e62c46c4fc46f777fa64a931beaef18f2bb0bd7f (patch) | |
tree | 113d7ded7ee6799f5e189d66c7195aa2ce56dad1 /ext | |
parent | 405e487a7347181f6f49f01839c807c84fc93e41 (diff) |
fix grouped definition sorting bug (fixes #41)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bg/js/util.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index d1099262..b3e4feec 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -375,7 +375,7 @@ function dictTermsGroup(definitions, dictionaries) { expression: firstDef.expression, reading: firstDef.reading, reasons: firstDef.reasons, - score: groupDefs.reduce((x, y) => x.score > y.score ? x.score : y.score, Number.MIN_SAFE_INTEGER), + score: groupDefs.reduce((p, v) => v.score > p ? v.score : p, Number.MIN_SAFE_INTEGER), source: firstDef.source }); } |