FIX: ensures routing to / with query string works (#7859)

FIX: ensures routing to / with query string works (#7859)

diff --git a/app/assets/javascripts/discourse/lib/url.js.es6 b/app/assets/javascripts/discourse/lib/url.js.es6
index 35af141..bba1db7 100644
--- a/app/assets/javascripts/discourse/lib/url.js.es6
+++ b/app/assets/javascripts/discourse/lib/url.js.es6
@@ -441,7 +441,7 @@ const DiscourseURL = Ember.Object.extend({
     // The default path has a hack to allow `/` to default to defaultHomepage
     // via BareRouter.handleUrl
     let transition;
-    if (path === "/") {
+    if (path === "/" || path.substring(0, 2) === "/?") {
       router._routerMicrolib.updateURL(path);
       transition = router.handleURL(path);
     } else {

GitHub sha: f140c4d4

2 Likes

This commit has been mentioned on Discourse Meta. There might be relevant details there: