client/tag-categories: sort by order on tag-category edit page

This commit is contained in:
Shyam Sunder 2020-09-25 00:02:12 -04:00
parent 697bd45420
commit afe4c5c847

View file

@ -24,7 +24,9 @@ class TagCategoriesView extends events.EventTarget {
} else if (a.isDefault) { } else if (a.isDefault) {
return -1; return -1;
} }
return a.name.localeCompare(b.name); return a.order == b.order
? a.name.localeCompare(b.name)
: a.order - b.order;
}); });
for (let tagCategory of categoriesToAdd) { for (let tagCategory of categoriesToAdd) {
this._addTagCategoryRowNode(tagCategory); this._addTagCategoryRowNode(tagCategory);