title: retrieving an image from firebase storage to a vue app
body: <p>I am trying to download an image from my firebase storage to render it in my Vue app, the upload from the application to the firebase storage is successful, however upon retrieval it gives me an error cannot read property '0' of undefined, i am using the firebase SDK in a Vue CLI 3 setup and vuex to manage my state. Here is the function setting in my actions in the main store.js file</p>
  
  <pre><code>  let imageUrl
    let key
    firebase.database().ref('meetups').push(meetup)
      .then((data) =&gt; {
        key = data.key
        return key
      })
      .then(key =&gt; {
        const filename = payload.image.name
        const ext = filename.slice(filename.lastIndexOf('.'))
        return firebase.storage().ref('meetups/' + key + '.' + ext).put(payload.image)
      })
      .then(fileData =&gt; {
        imageUrl = fileData.metadata.downloadURLs[0]
        return firebase.database().ref('meetups').child(key).update({imageUrl: imageUrl})
      })
      .then(() =&gt; {
        commit('createMeetup', {
          ...meetup,
          imageUrl: imageUrl,
          id: key
        })
      })
      .catch((error) =&gt; {
        console.log(error)
      })
  </code></pre>