title: pushing to list results in one item always being left out
body: <p>I'm trying to take an object, upload a file in the object, get the downloaded url and add it to the the object, the problem is whenever I try to push the new data to an array, I always end up missing one of the items and I can't tell why this is happening.</p>
  <p>My code:</p>
  <pre><code>const transformedData = async () =&gt; {
    const urlList = [];
    for await (let dog of data.dogs) {
      // console.log(dog);
      if (dog.file.length === 0 || dog.file === undefined) {
       
        urlList.push({ ...dog, akcPapersUrl: &quot;&quot; });
      } else {
        
        const uploadTask = await storageRef
          .child(`dog/${dog.akcNumber}/${dog.file[0].name}`)
          .put(dog.file[0]);
  
        uploadTask.ref.getDownloadURL().then((res) =&gt; {
          urlList.push({ ...dog, akcPapersUrl: res });
        });
      }
    }
    console.log(urlList);
    return urlList;
  };
  
  await transformedData()
    .then((res) =&gt; {
      data = { ...data, transformed: res };
      return data;
    })
    .then((res) =&gt; {
      console.log(res);
      sendRegistration(res);
    });
  </code></pre>