From 948e283e0f0654a7bd1d48554623afc84beb03f4 Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Tue, 5 Nov 2024 17:51:22 +0200 Subject: [PATCH] FIX: Use correct styles on category pages (#29588) Multiple category styles can be used on the same site. The category and subcategories page will use the "desktop_category_page_style" setting and individual category pages will use the style selected in settings, if any. Commit c1f078ca tried to use the same style for both the category and subcategories page, but the route matching did not take into account the "discovery.categoryAll" and "discovery.categoryNone" variants of the "discovery.category" route. --- .../discourse/app/components/discovery/categories-display.gjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/discovery/categories-display.gjs b/app/assets/javascripts/discourse/app/components/discovery/categories-display.gjs index aaea91723ae..f1679b5db85 100644 --- a/app/assets/javascripts/discourse/app/components/discovery/categories-display.gjs +++ b/app/assets/javascripts/discourse/app/components/discovery/categories-display.gjs @@ -83,7 +83,7 @@ export default class CategoriesDisplay extends Component { get categoriesComponent() { if ( this.args.parentCategory && - this.router.currentRouteName === "discovery.category" + this.router.currentRouteName !== "discovery.subcategories" ) { return this.#componentForSubcategories; } else {