From d9fb96976534bb2b0254bd7365959e7637c9076a Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sun, 9 Aug 2020 21:23:13 +0200 Subject: [PATCH] Fix sort order of examples search results --- examples/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/index.js b/examples/index.js index 5392a59964..fcee11c512 100644 --- a/examples/index.js +++ b/examples/index.js @@ -72,7 +72,7 @@ // sort examples, first by number of words matched, then // by word frequency examples.sort(function (a, b) { - return a.score - b.score || a.words - b.words; + return b.score - a.score || b.words - a.words; }); return examples; }