title: Exception in template helper: TypeError: Cannot read property 'profile' of undefined
body: <p>Now I had a similar problem before where I was getting this error:</p>
  
  <blockquote>
    <p>Exception in template helper: TypeError: Cannot read property
    'profile' of undefined</p>
  </blockquote>
  
  <p>The same thing is happening again but on the second order, which contains another users profile information (the first profile is defined).
  How would I get it to re-render in {{#each orders}}?</p>
  
  <p>It also appears that info.firstName, lastName, and building gets called 3 times for some reason when there are only 2 orders...</p>
  
  <p>In HTML:</p>
  
  <pre><code>&lt;template name="orderItem"&gt;
    &lt;section&gt;
      &lt;form role="form" id="ordersList"&gt;
        &lt;div&gt;
          {{#each orders}}
            &lt;input type="text" name="name" value="{{info.firstName}} {{info.lastName}}"&gt;
          {{/each}}
        &lt;/div&gt;
        &lt;div&gt;
          {{#each orders}}
            &lt;input type="text" name="building" value={{info.building}}&gt;
          {{/each}}
        &lt;/div&gt;
        &lt;div&gt;
          {{#each orders}}
            &lt;input type="text" name="featuredDish" value={{featuredDish}}&gt;
          {{/each}}
        &lt;/div&gt;
      &lt;/form&gt;
    &lt;/section&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>In javascript:</p>
  
  <pre><code>Template.orderItem.orders = function() {
    var todaysDate = new Date();
    return Orders.find({dateOrdered: {"$gte": todaysDate}});
  };
  
  Template.orderItem.info = function() {
    var userId = this.userId;
    var user = Meteor.users.findOne(userId)
    var firstName = user.profile.firstName;
    var lastName = user.profile.lastName;
    var building = user.profile.building;
  
    return {
      firstName: firstName,
      lastName: lastName,
      building: building
    }
  };
  </code></pre>
  
  <p>Appreciate the help!</p>