mirror of
https://github.com/discourse/discourse.git
synced 2025-02-12 22:34:57 +00:00
FIX: Regression with Categories nav item (#17885)
This commit is contained in:
parent
4b70594173
commit
2c5ab47204
@ -10,6 +10,6 @@ export default Controller.extend(FilterModeMixin, {
|
|||||||
|
|
||||||
@discourseComputed("router.currentRoute.queryParams.f")
|
@discourseComputed("router.currentRoute.queryParams.f")
|
||||||
skipCategoriesNavItem(filterParamValue) {
|
skipCategoriesNavItem(filterParamValue) {
|
||||||
return !filterParamValue || filterParamValue !== TRACKED_QUERY_PARAM_VALUE;
|
return filterParamValue === TRACKED_QUERY_PARAM_VALUE;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -262,7 +262,7 @@ NavItem.reopenClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(category || !args.skipCategoriesNavItem) &&
|
(category || args.skipCategoriesNavItem) &&
|
||||||
i.name.startsWith("categor")
|
i.name.startsWith("categor")
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -69,6 +69,13 @@ acceptance("Topic Discovery Tracked", function (needs) {
|
|||||||
"the categories nav item is displayed when tracked filter is not present"
|
"the categories nav item is displayed when tracked filter is not present"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await visit("/categories");
|
||||||
|
|
||||||
|
assert.ok(
|
||||||
|
exists("#navigation-bar li.categories"),
|
||||||
|
"the categories nav item is displayed on categories route when tracked filter is not present"
|
||||||
|
);
|
||||||
|
|
||||||
await visit("/?f=tracked");
|
await visit("/?f=tracked");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user