title: iron-router not waiting on meteor.user() to return
body: <p><strong>Solved but looking for improvements, see answers</strong></p>
  
  <pre><code>    function completedProfile() {
          if (Meteor.user() &amp;&amp; Meteor.user().profile.primary_email &amp;&amp; Meteor.user().profile.display_name &amp;&amp; Meteor.user().university_id) {
              return true;
          } else {
              return false;
          }
      }
  
      Router.map(function() {
          this.route('landing', {
              path: '/', // match the root path
              onBeforeAction: function() {
                  this.subscribe('users').wait();
                  if (this.ready() &amp;&amp; completedProfile()) {
                      this.render('bulletin')
                  } else {
                      this.redirect('splash');
                  }
              }
          });
      });
  </code></pre>
  
  <p>The page will redirect to my splash template since the completeProfile function is false (all fields are null in if statement).</p>
  
  <p>Attempt 2 (hangs on splash after fields have been populated):</p>
  
  <pre><code>    Router.map(function() {
          this.route('landing', {
              path: '/', // match the root path
              action: function() {
                  if (this.ready() &amp;&amp; completedProfile()) {
                      this.redirect('bulletin')
                  } else {
                      this.render('splash');
                  }
              },
          });
  </code></pre>
  
  <p><strong>Attempt 3:</strong></p>
  
  <pre><code>    function completedProfile() {
          if (Meteor.user() &amp;&amp; Meteor.user().profile.primary_email &amp;&amp; Meteor.user().profile.display_name &amp;&amp; Meteor.user().profile.university_id) {
              return true;
          } else {
              return false;
          }
      }
  
      Router.map(function() {
                  this.route('landing', {
                      path: '/', // match the root path
                      action: function() {
                          console.log(Meteor.user().profile);  //this fails
                          console.log(this.ready(), completedProfile()); //this then returns as expected
                          if (this.ready() &amp;&amp; !completedProfile()) {
                              this.redirect('splash');
                          } else {
                              this.render('bulletin')
                          }
                      },
                  });
  
                  this.route('splash', {
                      path: '/splash', // match the root path
                  });
  
                  this.route('bulletin', {
                      path: '/bulletin', // match the root path
                  });
  </code></pre>
  
  <p>It's really weird that this works. The log of Meteor.user results in an error and <em>then</em> Meteor.user() loads giving me an appropriate completedProfile() return. The error is <code>Exception in callback of async function: TypeError: Cannot read property 'profile' of undefined
  </code> .</p>