client/tags: fix sorting by tag usage
This commit is contained in:
parent
c0fd46c890
commit
1c5f44a91c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue