title: "Cannot read property 'then' of undefined" when dispatching action
body: <p>Following the <a href="http://redux.js.org/docs/advanced/AsyncActions.html#async-action-creators" rel="nofollow noreferrer">example</a> provided by the Redux docs I have setup my action creator as so:</p>
  
  <pre><code>export function createAlbumType(props) {
    return function (dispatch, getState) {
      dispatch({
        type: CREATE_ALBUM_TYPE_REQUEST,
      });
  
      axios.post(`${ALBUM_TYPES_URL}`, props).then(
        response =&gt; dispatch({
          type: CREATE_ALBUM_TYPE_SUCCESS,
          response,
        }),
        error =&gt; dispatch({
          type: CREATE_ALBUM_TYPE_FAILURE,
          error,
        })
      );
    };
  }
  </code></pre>
  
  <p>After my album type is successfully saved I'd like to simply redirect the user back to the index page. Unfortunately I'm not getting a promise back after dispatching. Based on my code, what seems to be the problem? I'm using <code>redux-thunk</code> as my middleware and <code>react-redux-router</code> for routing.</p>
  
  <pre><code>  onCreateSubmit(values) {
      const { dispatch } = this.props;
  
      return dispatch(createAlbumType(values))
        .then((action) =&gt; {
          if (action.type === 'CREATE_ALBUM_TYPE_SUCCESS') {
            dispatch(push('/album_types'));
          }
        });
    }
  </code></pre>
  
  <hr>
  
  <pre><code>const store = createStore(reducers, {}, compose(
      applyMiddleware(
        routerMiddleware(browserHistory), 
        thunkMiddleware
      ),
      window.devToolsExtension ? window.devToolsExtension() : f =&gt; f
    )
  );
  
  const history = syncHistoryWithStore(browserHistory, store)
  
  ReactDOM.render(
    &lt;Provider store={ store } &gt;
      &lt;Router history={ history } routes={ routes } /&gt;
    &lt;/Provider&gt;,
    document.getElementById('root')
  );
  </code></pre>