From 1c5f44a91c15865471735f79fb98036ad558de63 Mon Sep 17 00:00:00 2001 From: rr- Date: Wed, 22 Jun 2016 23:54:19 +0200 Subject: [PATCH] client/tags: fix sorting by tag usage --- client/js/controls/tag_auto_complete_control.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/controls/tag_auto_complete_control.js b/client/js/controls/tag_auto_complete_control.js index 8626b5a1..a9fb7f0a 100644 --- a/client/js/controls/tag_auto_complete_control.js +++ b/client/js/controls/tag_auto_complete_control.js @@ -25,7 +25,7 @@ class TagAutoCompleteControl extends AutoCompleteControl { return Array.from(allTags.entries()) .filter(kv => match(transform(kv[0]), text)) .sort((kv1, kv2) => { - return kv2[1].postCount - kv1[1].postCount; + return kv2[1].usages - kv1[1].usages; }) .map(kv => { const category = kv[1].category;