diff --git a/packages/roc-package-web-app-react/app/client/create-client.js b/packages/roc-package-web-app-react/app/client/create-client.js index 5fc7856..f65573b 100644 --- a/packages/roc-package-web-app-react/app/client/create-client.js +++ b/packages/roc-package-web-app-react/app/client/create-client.js @@ -6,6 +6,7 @@ import ReactDOM from 'react-dom'; import Router from 'react-router/lib/Router'; import useRouterHistory from 'react-router/lib/useRouterHistory'; import { createHistory } from 'history'; +import { supportsHistory } from 'history/lib/DOMUtils'; import debug from 'debug'; @@ -84,7 +85,12 @@ export default function createClient({ createRoutes, createStore, mountNode }) { const { syncHistoryWithStore } = require('react-router-redux'); const store = createStore(history, window.FLUX_STATE); - history = syncHistoryWithStore(history, store); + history = syncHistoryWithStore(history, store, { + // We do not want to use adjustUrlOnReplay if the browser does + // not support the history API with pushState since this can lead + // to redirect loops https://github.com/reactjs/react-router-redux/issues/285 + adjustUrlOnReplay: supportsHistory() + }); routes = createRoutes(store); locals = { diff --git a/packages/roc-package-web-app-react/package.json b/packages/roc-package-web-app-react/package.json index a99d88a..067e42a 100644 --- a/packages/roc-package-web-app-react/package.json +++ b/packages/roc-package-web-app-react/package.json @@ -37,7 +37,7 @@ "react-helmet": "~3.1.0", "react-redux": "~4.4.5", "react-router": "~2.3.0", - "react-router-redial": "~0.1.0", + "react-router-redial": "~0.2.1", "react-router-redux": "~4.0.2", "react-server-status": "~1.0.0", "redial": "~0.4.1",