I am getting undefined
when trying to query a collection, please what is wrong? When I ran it on the console it returns the same thing. In the Mongodb record, everything exist. I posted the screenshot using Robomongo.
userDetails: function () {
if (!Meteor.user()) {
Bert.alert("You are not logged in, permission denied.", "danger", "growl-top-right");
return false;
}else{
return UserDetailsList.findOne({userId: Meteor.userId});
}
}
This is the blaze template:
<p>{{userDetails.industry}}</p>
<p>{{userDetails.profession}}</p>