getComponentForState made more generic (#2498)

This commit is contained in:
Marcin Raburski
2018-02-19 12:14:13 +00:00
parent b677a7c31f
commit e7cc0a53b9

View File

@@ -239,7 +239,7 @@ export default (routeConfigs, config = {}) => {
},
getComponentForState(state) {
const routeName = order[state.index];
const routeName = state.routes[state.index].routeName;
invariant(
routeName,
`There is no route defined for index ${state.index}. Check that