diff --git a/client/js/views/tag_categories_view.js b/client/js/views/tag_categories_view.js index 7cd5c19e..e052fd4d 100644 --- a/client/js/views/tag_categories_view.js +++ b/client/js/views/tag_categories_view.js @@ -24,7 +24,9 @@ class TagCategoriesView extends events.EventTarget { } else if (a.isDefault) { 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) { this._addTagCategoryRowNode(tagCategory);