From 158670ca5e32703622ac1e7597fb67d805666e74 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 20 Dec 2016 11:42:15 -0500 Subject: [PATCH] FIX: if categories page is default, redirect to Top was never working --- app/assets/javascripts/discourse/routes/discovery.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/routes/discovery.js.es6 b/app/assets/javascripts/discourse/routes/discovery.js.es6 index 400d1df1eea..a77806d1a4d 100644 --- a/app/assets/javascripts/discourse/routes/discovery.js.es6 +++ b/app/assets/javascripts/discourse/routes/discovery.js.es6 @@ -11,7 +11,7 @@ export default Discourse.Route.extend(OpenComposer, { }, beforeModel(transition) { - if (transition.intent.url === "/" && + if ((transition.intent.url === "/" || transition.intent.url === "/categories") && transition.targetName.indexOf("discovery.top") === -1 && Discourse.User.currentProp("should_be_redirected_to_top")) { Discourse.User.currentProp("should_be_redirected_to_top", false);