title: Data in Firestore not updating
body: <p>Here is a <code>javascript</code> function intending to perform an update on <code>FireStore</code>, which does not work.</p>
  
  <p>I will be more that happy if anyone can see an issue in the code.</p>
  
  <pre><code>function makeUpdate(key,name) {
      let theCollection = db.collection("InformationList"),
      infoUnit = theCollection.doc(key).get().then(function(doc) {
          if (doc.exists) {
              console.log("infoUnit -name-:" + doc.get("name"));
              console.log("infoUnit -telephone-:" + doc.get("telephone"));
              let updateDico = {};
              updateDico["name"] = name;
              doc.update(updateDico);
          } else {
              console.log("embassyUpdate --&gt; No such document!");
          }
      }).catch(err =&gt; {
          console.log("Error getting documents (in makeUpdate)", err);
      });
  }
  </code></pre>
  
  <p>Apart from the fact that it does not perform the expected update, it prints three messages in the logs:</p>
  
  <ul>
  <li>infoUnit -name-: some name </li>
  <li>infoUnit -telephone-: some telephone number</li>
  <li>Error getting documents (in makeUpdate) </li>
  </ul>
  
  <p>From that I can see that a record is found in the database as expected. But at the same time an unknown error occurs.</p>