title: Cannot read property 'email' of null at HTMLDocument (Firebase)
body: <p>I try to run this firebase function but it returns null every single time</p>
  
  <pre><code>function gen_tell_name() {
        $(document).ready(function() {
          var db = firebase.firestore();
          var email = firebase.auth().currentUser.email;
          var docRef = db.collection("users").doc(email);
          docRef.get().then(function(doc) {
                  $("#teller-name").append(doc.data().Name);
           });
        });
      };
  </code></pre>
  
  <p>I think I need some way to run it after all firebase functions are done but I do not know how.</p>