title: FirebaseError: Expected type 'Hc', but it was: a custom Yc object]
body: <p>i am trying to do a batch entry, but this error keeps occurring.
  i am passing an array in a .doc, it works fine on other function, where i pass an array into .doc using loops and functions.</p>
  <p>please help me out and please explain me what the error means.</p>
  <p><img src="https://i.stack.imgur.com/zHHGI.png" alt="" /></p>
  <pre><code>export const AddTaskToFriend = (
    ArryOfIds,
    email,
    title,
    tag,
    prayority,
    completed
  ) =&gt; {
    return async (dispatch) =&gt; {
      const db = firebase.firestore();
      var batch = db.batch();
  
      for (let i = 0; i &lt; ArryOfIds.length; i++) {
        const Collections = db
          .collection(&quot;Tasks&quot;)
          .doc(ArryOfIds[i])
          .collection(&quot;SingleTask&quot;);
        batch.set(Collections, {
          creater: firebase.auth().currentUser.uid,
          UpdatedOn: new Date().toString(),
          CreatedOn: new Date().toString(),
          email,
          title,
          tag,
          prayority,
          completed,
        });
      }
      batch
        .commit()
        .then((success) =&gt; {
          console.log(` its a success ${success}`);
        })
        .catch((error) =&gt; {
          console.log(error);
        });
  </code></pre>