FIX: Clicking logo when login_required threw an error

This commit is contained in:
Robin Ward 2014-07-29 13:46:42 -04:00
parent af36df057c
commit df9bd3d666

View File

@ -9,6 +9,8 @@
**/
Discourse.DiscoveryRoute = Discourse.Route.extend(Discourse.ScrollTop, Discourse.OpenComposer, {
redirect: function() { Discourse.redirectIfLoginRequired(this); },
beforeModel: function(transition) {
if (transition.targetName.indexOf("discovery.top") === -1 &&
Discourse.User.currentProp("should_be_redirected_to_top")) {