diff options
| author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2022-05-29 20:53:21 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-29 20:53:21 -0400 | 
| commit | f3024c50186344aa6a6b09500ea02540463ce5c9 (patch) | |
| tree | e025145199f50bdefaef16e0962486ea844825fa /ext/js | |
| parent | 5d0c22e76d3ee15a672de2d93f9e1abcc55c72f0 (diff) | |
Sort using number of definitions (#2166)
Diffstat (limited to 'ext/js')
| -rw-r--r-- | ext/js/language/translator.js | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index ddbd01e6..b18e9dd0 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -1402,6 +1402,10 @@ class Translator {                  if (i !== 0) { return i; }              } +            // Sort by definition count +            i = v2.definitions.length - v1.definitions.length; +            if (i !== 0) { return i; } +              // Sort by dictionary order              i = v1.dictionaryIndex - v2.dictionaryIndex;              return i; |