Fix TabRouter to support shorthand route config

This commit is contained in:
Brent Vatne
2018-02-19 18:00:13 -08:00
parent e27afea7ab
commit 1b8422d77d

View File

@@ -30,8 +30,9 @@ export default (routeConfigs, config = {}) => {
paths[routeName] =
typeof routeConfig.path === 'string' ? routeConfig.path : routeName;
tabRouters[routeName] = null;
if (routeConfig.screen && routeConfig.screen.router) {
tabRouters[routeName] = routeConfig.screen.router;
const screen = getScreenForRouteName(routeConfigs, routeName);
if (screen.router) {
tabRouters[routeName] = screen.router;
}
});
if (initialRouteIndex === -1) {