FIX: Error viewing user page when not logged in.
This commit is contained in:
parent
82116d5db5
commit
0cbf7c2417
|
@ -13,7 +13,7 @@ Discourse.UserRoute = Discourse.Route.extend({
|
||||||
// If we're viewing the currently logged in user, return that object
|
// If we're viewing the currently logged in user, return that object
|
||||||
// instead.
|
// instead.
|
||||||
var currentUser = Discourse.User.current();
|
var currentUser = Discourse.User.current();
|
||||||
if (params.username.toLowerCase() === currentUser.get('username_lower')) {
|
if (currentUser && (params.username.toLowerCase() === currentUser.get('username_lower'))) {
|
||||||
return currentUser;
|
return currentUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue