found
found copied to clipboard
when rewinding state with devtools we can error.
Getting this error when there is no initialized state.
Uncaught TypeError: Cannot read property 'match' of null
at Function.ConnectedRouter.onResolveMatch [as mapToProps] (VM3912 bundle.js:32294)
at mapToPropsProxy (VM3912 bundle.js:30183)
at impureFinalPropsSelector (VM3912 bundle.js:64419)
at Object.runComponentSelector [as run] (VM3912 bundle.js:29477)
at Connect.componentWillReceiveProps (VM3912 bundle.js:29601)
at VM3912 bundle.js:59095
at measureLifeCyclePerf (VM3912 bundle.js:58560)
at ReactCompositeComponentWrapper.updateComponent (VM3912 bundle.js:59094)
at ReactCompositeComponentWrapper.receiveComponent (VM3912 bundle.js:59031)
at Object.receiveComponent (VM3912 bundle.js:7878)
Maybe not attempt to resolve a match in this case?
var ConnectedRouter = (0, _reactRedux.connect)(function (state) {
var _getFound = getFound(state),
match = _getFound.match, <--- match is null here
resolvedMatch = _getFound.resolvedMatch;
return { match: match, resolvedMatch: resolvedMatch };
}, {
onResolveMatch: resolveMatch
}, null, {
// Don't block context propagation from above. The router should seldom
// be unnecessarily rerendering anyway.
pure: false
})((0, _createBaseRouter2.default)(options));
Hmm, but then what, though? Render nothing at all? Unless I'm mistaken, we need the Farce "init" action to have anything render-able.
Not sure really, I would prefer to do nothing at all I guess.