Skip to content

Commit

Permalink
Update injectRouterProp for react-redux 6.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xdissent committed Feb 24, 2019
1 parent cd08391 commit 5f7b64c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/utils/injectRouterProp.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ export default function injectRouterProp(ConnectedComponent) {
const baseRender = ConnectedComponent.prototype.render;

function wrapSelectDerivedProps(baseSelectDerivedProps) {
return function selectDerivedProps(state, props, store) {
const derivedProps = baseSelectDerivedProps(state, props, store);
return function selectDerivedProps(
state,
props,
store,
selectorFactoryOptions,
) {
const derivedProps = baseSelectDerivedProps(
state,
props,
store,
selectorFactoryOptions,
);

if (!store[ROUTER]) {
// Memoize the store router object.
Expand Down

0 comments on commit 5f7b64c

Please sign in to comment.