title: Uncaught TypeError: Cannot read property 'type' of undefined React Router Redux
body: <p>Using "react-router-dom": "^4.1.2", "react-router-redux": "^5.0.0-alpha.6" I get as per title "Uncaught TypeError: Cannot read property 'type' of undefined React Router Redux" in console.log() the moment after the redirect is done.
  Screenshots show it's not a problem with the action observable containing the payload data. Payload contains form data (values) and history object.
  I managed to send them and then capture them by means of a recursive function that uses mergeMap instead of ES6 map since I am dealing with Observables.
  <a href="https://github.com/Deviad/redux-router-playground/blob/under_development_v5/src/epics/epic_posts.js" rel="nofollow noreferrer">link to the repo</a></p>
  
  <p><a href="https://i.stack.imgur.com/xRHED.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xRHED.png" alt="enter image description here"></a></p>
  
  <pre><code>    import * as ActionTypes from "../ActionTypes";
      import { createPostFulfilled, fetchPosts, fetchPostsFulfilled, fetchPostsWithIdFulfilled, changeRoute } from "../actions";
      import {store, history} from "../configureStore";
      import { Observable } from "rxjs/Observable";
      import "rxjs/add/observable/combineLatest";
      import "rxjs/add/operator/debounceTime";
      import { concat as concat$ } from "rxjs/observable/concat";
      import { from as from$ } from "rxjs/observable/from";
      import { of as of$ } from "rxjs/observable/of";
      import "rxjs/add/operator/map";
      import "rxjs/add/operator/mergeMap";
      import "rxjs/add/operator/startWith";
      import "rxjs/add/operator/filter";
      import "rxjs/add/operator/switchMap";
      import "rxjs/add/operator/concatMap";
      import "rxjs/add/operator/catch";
      import "rxjs/add/observable/dom/ajax";
      import {push} from "react-router-redux";
      const ROOT_URL = "http://reduxblog.herokuapp.com/api";
      const API_KEY = "key=davide123";
  
      export  const fetchPostsEpic = (action$) =&gt; {
  
          return action$.filter((action$)=&gt; action$.type === ActionTypes.FETCH_POSTS)
              .mergeMap(action$ =&gt; {
                return  Observable.ajax.getJSON(`${ROOT_URL}/posts/?${API_KEY}`)
                      .map(response =&gt; fetchPostsFulfilled(response), (err) =&gt; {console.log(err);});
              });
      };
  
      export const fetchPostsWithIdEpic = (action$) =&gt; {
          return action$.filter((action$)=&gt; action$.type === ActionTypes.FETCH_POSTS_WITH_ID)
          .mergeMap(action$ =&gt; {
            return  Observable.ajax.getJSON(`${ROOT_URL}/posts/?${action$.payload}&amp;amp;${API_KEY}`)
                  .map(response =&gt; fetchPostsWithIdFulfilled(response), (err) =&gt; {console.log(err);});
          });
      };
  
      export  const createPostEpic = (action$) =&gt; {
          const actionVectorizer = ((action$) =&gt; {
              if (action$)
              return action$.isArray() ?   [].concat(...action$.mergeMap(x =&gt; actionVectorizer(x))) : action$;
          })();
          return action$.filter((action$)=&gt; action$.type === ActionTypes.CREATE_POST)
              .mergeMap(action$ =&gt; {
                      console.log("action$ is...");
                      console.log(action$);
                      let { values, history } = action$.payload;
                      return   Observable.ajax.post(`${ROOT_URL}/posts/?${API_KEY}`, values)
                              .map(
                                  (data) =&gt; {
                                      if (data.status === 201) {
                                          console.log("Success status", data.status);
                                          history.push("/");
                                          // return createPostFulfilled(data.status);
                                      }
                                      else {console.log("Server error is", data.status);}
                                  },
                                  (err) =&gt; {console.log(err);}
                              );
              });
      };
  </code></pre>