diff --git a/src/utils/routerUtil.js b/src/utils/routerUtil.js index 037cb10..f2d04a3 100644 --- a/src/utils/routerUtil.js +++ b/src/utils/routerUtil.js @@ -34,7 +34,7 @@ function parseRoutes(routesConfig, routerMap) { let router = undefined, routeCfg = {} if (typeof item === 'string') { router = routerMap[item] - routeCfg = {path: router.path || item, router: item} + routeCfg = {path: (router && router.path) || item, router: item} } else if (typeof item === 'object') { router = routerMap[item.router] routeCfg = item