title: Cannot destructure property 'data' of '(intermediate value)' as it is undefined
body: <p>This error is in the console and it prevents the app from working, I cant find the bug at all if anyone could help? Its a MERN application</p>
  <p>The code in question</p>
  <pre><code>export const getPosts = () =&gt; async (dispatch) =&gt; {
      try {
        const { data } = await api.fetchPosts();
    
        dispatch({ type: 'FETCH_ALL', payload: data });
      } catch (error) {
        console.log(error.message);
      }
    };
  </code></pre>
  <p>VSC is telling me await doesn't effect this kind of expression, which it should as fetchPosts is a request? The code for this is below</p>
  <pre><code>export const fetchPosts = () =&gt; {
      axios.get(url)
  }
  </code></pre>