found icon indicating copy to clipboard operation
found copied to clipboard

when rewinding state with devtools we can error.

Open loops-and-spells opened this issue 8 years ago • 2 comments

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));

loops-and-spells avatar Sep 16 '17 00:09 loops-and-spells

Hmm, but then what, though? Render nothing at all? Unless I'm mistaken, we need the Farce "init" action to have anything render-able.

taion avatar Sep 18 '17 19:09 taion

Not sure really, I would prefer to do nothing at all I guess.

loops-and-spells avatar Oct 20 '17 16:10 loops-and-spells