diff --git a/package.json b/package.json index ff4da87..0e744c0 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "webpack": "^1.12.1" }, "dependencies": { - "deep-equal": "^1.0.1", - "history": "^1.12.0" + "deep-equal": "^1.0.1" } } diff --git a/src/reduxReactRouter.js b/src/reduxReactRouter.js index 10150c0..0804764 100644 --- a/src/reduxReactRouter.js +++ b/src/reduxReactRouter.js @@ -25,6 +25,15 @@ export default function reduxReactRouter({ stringifyQuery }); + [ 'pushState', 'push', 'replaceState', 'replace', + 'setState', 'go', 'goBack', 'goForward', + 'listen', 'createLocation', 'match' ].forEach(funcName => { + if (!history.hasOwnProperty(funcName) && + typeof(history[funcName]) === 'function') { + throw new Error(`History API does not support function: ${funcName}`); + } + }); + const store = applyMiddleware( historyMiddleware(history)