title: Firestore returning an empty array
body: <p>I have this function here in a separate file, where:</p>
  <pre><code>export const getListOfChannels = (id) =&gt; {
    const channels = []
  
    firestore.collection(&quot;channels&quot;).where(&quot;channelId&quot;, &quot;==&quot;, id).get().then(querySnapshot =&gt; {
      querySnapshot.forEach(doc =&gt; {
        channels.push(doc.data().id)
      })
    })
    return channels
  }
  </code></pre>
  <p>And in another file, I'm doing:</p>
  <pre><code>// This is returning an empty array
  const returnFromFirebase = getListOfChannelsIdWithCommunityId(id)
  </code></pre>
  <p>It wasn't supposed to return an empty array, because if I do a <code>console.log(doc.data().id)</code> I can see the data.</p>
  <p>Am I doing something wrong?</p>