title: Cannot read property 'providesTags' of undefined
body: <p>I'm using RTK query to get one record via api via &quot;useGetUserQuery&quot;</p>
  <p>Api Call is ok because backend have result.
  I use sequelize and my result send data object.
  I tried to erase providestags but i have the same issue.</p>
  <p>My front-end return this error :</p>
  <pre><code>rtk-query.esm.js:771 Uncaught (in promise) TypeError: Cannot read property 'providesTags' of undefined
  at calculateProvidedByThunk (rtk-query.esm.js:771)
  at rtk-query.esm.js:908
  at redux-toolkit.esm.js:603
  at produce (immer.esm.js:1)
  at redux-toolkit.esm.js:602
  at Array.reduce (&lt;anonymous&gt;)
  at redux-toolkit.esm.js:581
  at combination (redux.js:528)
  at reducer (rtk-query.esm.js:992)
  at combination (redux.js:528)
  at computeNextEntry (&lt;anonymous&gt;:3395:21)
  at recomputeStates (&lt;anonymous&gt;:3429:17)
  at &lt;anonymous&gt;:3809:22
  at Object.dispatch (redux.js:288)
  at dispatch (&lt;anonymous&gt;:3856:17)
  at rtk-query.esm.js:1326
  ...
  at rtk-query.esm.js:1418
  at redux-toolkit.esm.js:386
  at index.js:11
  at redux-toolkit.esm.js:314
  at dispatch (redux.js:659)
  at redux-toolkit.esm.js:1144
  at step (redux-toolkit.esm.js:38)
  at Object.next (redux-toolkit.esm.js:19)
  at fulfilled (redux-toolkit.esm.js:72)
  </code></pre>
  <p>My code with RTK query is here :</p>
  <pre><code>import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
  import Cookie from 'js-cookie';
  import React from 'react';
  
  export interface User {
     id: string
     login: string
     password: string
     fonction: string
     imageprofil: string  
     ...
  }
  React.useLayoutEffect = React.useEffect
  type UsersResponse = User[]
  
  export const api = createApi({
      baseQuery: fetchBaseQuery({ baseUrl: 'http://localhost:8080/api/',
      prepareHeaders: (headers) =&gt; {
          const token = Cookie.get('token');   
          if (token) {
              headers.set('authorization', `Bearer ${token}`)
          }
          return headers
      }, 
  
  }),
   tagTypes: 'User',
  
  endpoints: (build) =&gt; ({
  
  getUser: build.query&lt;User, string&gt;({
      query: (id) =&gt; ({url:'users/'+id}),
      providesTags: 'User',        
  }),    
  }),
  }),
  })
  
   export const {         
       useGetUserQuery        
   } = api
  </code></pre>