From f3024c50186344aa6a6b09500ea02540463ce5c9 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 29 May 2022 20:53:21 -0400 Subject: Sort using number of definitions (#2166) --- ext/js/language/translator.js | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3