Skip to content

A platform for community discussion. Free, open, simple.

FIX: Topic filters persist when navigating to home page (#7175)

Vinoth Kannanbec3956f7f0d
diff --git a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6
index aa522af0f1e..709deffbaa1 100644
--- a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6
+++ b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6
@@ -24,7 +24,9 @@ const controllerOpts = {
expandAllPinned: false,
resetParams() {
- this.setProperties({ order: "default", ascending: false });
+ Object.keys(this.get("model.params") || {}).forEach(key =>
+ this.set(key, null)
+ );
},
actions: {