aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-05-29 20:53:21 -0400
committerGitHub <noreply@github.com>2022-05-29 20:53:21 -0400
commitf3024c50186344aa6a6b09500ea02540463ce5c9 (patch)
treee025145199f50bdefaef16e0962486ea844825fa
parent5d0c22e76d3ee15a672de2d93f9e1abcc55c72f0 (diff)
Sort using number of definitions (#2166)
-rw-r--r--ext/js/language/translator.js4
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;