title: Uncaught (in promise) TypeError: undefined is not iterable
body: <p>I have this error:</p>
  <pre><code>bundle.js:2066 Uncaught (in promise) TypeError: undefined is not iterable.
  </code></pre>
  <p>My code:</p>
  <pre class="lang-js prettyprint-override"><code>firebase.auth().onAuthStateChanged(user =&gt; {
    if (user)
    {
      if (user.uid != null)
      {
        let storageRef = firebase.storage().ref(&quot;Users/&quot; + user.uid);
        console.log(storageRef)
        storageRef.listAll().then( res =&gt; {
          let promises = res.items.forEach( item =&gt; item.getDownloadURL() );
      
          Promise.all(promises).then((downloadURLs) =&gt; {
              this.setState({ urlImage: downloadURLs });
          })
        })
      }
  
      console.log(this.state.urlImage)
  
      const actionPhoto = { type: &quot;TOGGLE_PHOTO&quot;, value: this.state.urlImage };
      this.props.dispatch(actionPhoto)
  
      const actionUid = { type: &quot;TOGGLE_UID&quot;, value: user.uid };
      this.props.dispatch(actionUid)
  
      // On ajoute le nom et la photo du current user
      const actionName = { type: &quot;TOGGLE_NAME&quot;, value: user.displayName };
      this.props.dispatch(actionName)
  
      //this.props.navigation.navigate('Navigation')
  }
  })
  </code></pre>
  <p>I have one item in <code>foreach(items)</code> and <code>ref()</code> storage firebase is good.</p>
  <p>Have you got an idea?</p>