client/tags: fix sorting by tag usage

This commit is contained in:
rr- 2016-06-22 23:54:19 +02:00
parent c0fd46c890
commit 1c5f44a91c
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class TagAutoCompleteControl extends AutoCompleteControl {
return Array.from(allTags.entries()) return Array.from(allTags.entries())
.filter(kv => match(transform(kv[0]), text)) .filter(kv => match(transform(kv[0]), text))
.sort((kv1, kv2) => { .sort((kv1, kv2) => {
return kv2[1].postCount - kv1[1].postCount; return kv2[1].usages - kv1[1].usages;
}) })
.map(kv => { .map(kv => {
const category = kv[1].category; const category = kv[1].category;