Skip to content

Commit

Permalink
Merge pull request #221 from mjrussell/history-dep-removal
Browse files Browse the repository at this point in the history
History dependency removal
  • Loading branch information
Scarysize committed Dec 24, 2015
2 parents 1f68bd1 + 0cdf254 commit 1ecb092
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"webpack": "^1.12.1"
},
"dependencies": {
"deep-equal": "^1.0.1",
"history": "^1.12.0"
"deep-equal": "^1.0.1"
}
}
9 changes: 9 additions & 0 deletions src/reduxReactRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1ecb092

Please sign in to comment.