mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
fix error when 404'ing user profile
This commit is contained in:
parent
ed03fa38a1
commit
dd42a667e4
1 changed files with 4 additions and 1 deletions
|
@ -4,7 +4,10 @@ Meteor.publish('singleUser', function(idOrSlug) {
|
|||
var findBySlug = Meteor.users.findOne({slug: idOrSlug});
|
||||
var user = typeof findById !== 'undefined' ? findById : findBySlug;
|
||||
var options = isAdminById(this.userId) ? {} : {fields: privacyOptions};
|
||||
return Meteor.users.find({_id: user._id}, options);
|
||||
if (user) {
|
||||
return Meteor.users.find({_id: user._id}, options);
|
||||
}
|
||||
return [];
|
||||
});
|
||||
|
||||
Meteor.publish('userPosts', function(terms) {
|
||||
|
|
Loading…
Add table
Reference in a new issue