mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-11 15:10:45 +01:00
fix: edge case in category filter
selecting a category and then clicking on all categories was breaking selection icons
This commit is contained in:
@@ -129,7 +129,8 @@ searchController.search = async function (req, res, next) {
|
||||
),
|
||||
},
|
||||
categories: {
|
||||
active: !!(Array.isArray(data.categories) && data.categories.length),
|
||||
active: !!(Array.isArray(data.categories) && data.categories.length &&
|
||||
(data.categories.length > 1 || data.categories[0] !== 'all')),
|
||||
label: await buildSelectedCategoryLabel(searchData.selectedCids),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user