FIX: if categories page is default, redirect to Top was never working

This commit is contained in:
Neil Lalonde 2016-12-20 11:42:15 -05:00
parent da4e27ca7d
commit 158670ca5e
1 changed files with 1 additions and 1 deletions

View File

@ -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);