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

approved

#1

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

  • FIX: Topic filters persist when navigating to home page

  • remove the line which no longer needed

diff --git a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6
index aa522af..709deff 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: {

GitHub sha: bec3956f


Approved #2