FIX: Fix a navigation bug

FIX: Fix a navigation bug

To reproduce:

  1. Visit a url in a new tab such as /latest?order=views

  2. Click a topic link

  3. Click the back button

Before this patch, you would not be sent back to the latest list.

Now, I am somewhat hesitant to delete code like this, but the original commit explains a situation that I cannot reproduce with the code missing.

I cannot seem to keep the filters as sticky even if I try. At the very least this is better to commit right now than the currently known broken situation.

diff --git a/app/assets/javascripts/discourse/lib/url.js.es6 b/app/assets/javascripts/discourse/lib/url.js.es6
index 7a35499..35af141 100644
--- a/app/assets/javascripts/discourse/lib/url.js.es6
+++ b/app/assets/javascripts/discourse/lib/url.js.es6
@@ -428,11 +428,6 @@ const DiscourseURL = Ember.Object.extend({
 
     if (opts.replaceURL) {
       this.replaceState(path);
-    } else {
-      const discoveryTopics = this.controllerFor("discovery/topics");
-      if (discoveryTopics) {
-        discoveryTopics.resetParams();
-      }
     }
 
     const split = path.split("#");

GitHub sha: ed936bcb

1 Like