From 9057379aac35a4eb69b847251e16db6139036dbd Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 15 Jan 2021 11:35:10 -0500 Subject: [PATCH] FIX: url:refresh triggered when query params change Going from /latest?f=tracked to /latest will result in three different topic list requests because the query params are not considered when determining if the route is staying the same. --- app/assets/javascripts/discourse/app/lib/url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/lib/url.js b/app/assets/javascripts/discourse/app/lib/url.js index 199b465b496..42a87f420a7 100644 --- a/app/assets/javascripts/discourse/app/lib/url.js +++ b/app/assets/javascripts/discourse/app/lib/url.js @@ -247,7 +247,7 @@ const DiscourseURL = EmberObject.extend({ return this.replaceState(path); } - const oldPath = window.location.pathname; + const oldPath = `${window.location.pathname}${window.location.search}`; path = path.replace(/(https?\:)?\/\/[^\/]+/, ""); // Rewrite /my/* urls