fix user profiles not loading when logged out
This commit is contained in:
parent
2f078dc8bf
commit
f6b6fd5389
@ -57,7 +57,7 @@ Router.route('/user/:email', {
|
|||||||
},
|
},
|
||||||
action: function() {
|
action: function() {
|
||||||
if(Meteor.users.findOne({'services.google.email': this.params.email}) !== undefined) {
|
if(Meteor.users.findOne({'services.google.email': this.params.email}) !== undefined) {
|
||||||
if(this.params.email === Meteor.user().services.google.email) {
|
if(Meteor.user() && this.params.email === Meteor.user().services.google.email) {
|
||||||
this.redirect('/profile');
|
this.redirect('/profile');
|
||||||
} else {
|
} else {
|
||||||
this.render('user');
|
this.render('user');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user