DEV: Change the params for categoryNone redirect (#20944)

Makes the params (`router.currentRoute.params`) the same in this codepath as in the regular flow. (issue originally reported in: https://meta.discourse.org/t/category-banners/86241/174)

See also https://github.com/discourse/discourse-category-banners/pull/31 for the first stab at the bug.
This commit is contained in:
Jarek Radosz 2023-04-06 12:26:19 +02:00 committed by GitHub
parent 3485936517
commit d6bf5f40fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -62,10 +62,10 @@ export default (filterArg, params) => {
) { ) {
// TODO: avoid throwing away preload data by redirecting on the server // TODO: avoid throwing away preload data by redirecting on the server
PreloadStore.getAndRemove("topic_list"); PreloadStore.getAndRemove("topic_list");
return this.replaceWith("discovery.categoryNone", { return this.replaceWith(
category, "discovery.categoryNone",
category_slug_path_with_id: modelParams.category_slug_path_with_id, modelParams.category_slug_path_with_id
}); );
} }
this._setupNavigation(category); this._setupNavigation(category);