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