Client subscribe not receiving data from Meteor server publish-Collection of common programming errors

I’ve been banging my head against the wall for a while now, and I assume I’m missing something simple here.

I’m running this on my Meteor server:

// --- Collections ---
Projects = new Meteor.Collection('projects');
Team = new Meteor.Collection('team');

// --- Only publish user data for users on my team ---
Meteor.publish('team', function() {
    var team = Meteor.users.findOne({_id: this.userId}).profile._team;
    console.log(Meteor.users.find({'profile._team': team}, {fields: {_id: 1, profile: 1}}).fetch());
    return Meteor.users.find({'profile._team': team}, {fields: {_id: 1, profile: 1}});
});

This finds all of the users who are on the same “team” by running a query on all user documents who have the same id in the profile._team property as the currently logged in user. You’ll see the console.log(...); in the publish function (on the line before the return statement), and it correctly logs the documents I expect it to in my terminal.

Now I’m running this on my client:

// --- Data ---
Meteor.subscribe('team');
Team = new Meteor.Collection('team');

Template.team.team = function() {
    console.log(Team.findOne());
    return Team.find();
};

However, the console.log(Team.findOne()) always logs undefined, Team.find() always returns an empty array. What am I doing incorrectly that is stopping my documents from reaching the client?

UPDATE: Here’s the template code.


    {{> team}}



    
TEAM TEMPLATE WORKS

{{#each team}}
TEAM EACH WORKS

{{profile.firstName}} {{profile.lastName}} {{/each}}

“TEAM EACH WORKS” is never rendered inside the {{#each}} tag, but “TEAM TEMPLATE WORKS” renders as expected when it is placed before the {{#each}} tag.