From b9fc9dc9fc38f79aa68930ebc9a2708401df3161 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 22 Dec 2016 11:37:17 -0500 Subject: [PATCH] FIX: Routing to default homepage with query params was broken --- app/assets/javascripts/discourse/mapping-router.js.es6 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/mapping-router.js.es6 b/app/assets/javascripts/discourse/mapping-router.js.es6 index 92183baab63..e88b7f746d3 100644 --- a/app/assets/javascripts/discourse/mapping-router.js.es6 +++ b/app/assets/javascripts/discourse/mapping-router.js.es6 @@ -8,7 +8,12 @@ const BareRouter = Ember.Router.extend({ handleURL(url) { const params = url.split('?'); - if (params[0] === "/") { url = defaultHomepage(); } + if (params[0] === "/") { + url = defaultHomepage(); + if (params[1] && params[1].length) { + url = `${url}?${params[1]}`; + } + } return this._super(url); } });