mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-05 07:27:06 +08:00
fix: the exception when async route is not registered;🌟
修复:异步路由组件未注册时导致的异常;
This commit is contained in:
parent
c10ea64ba7
commit
9445f0fbbb
@ -14,7 +14,7 @@ function parseRoutes(routesConfig, routerMap) {
|
||||
routesConfig.forEach(item => {
|
||||
// 获取注册在 routerMap 中的 router,初始化 routeCfg
|
||||
let router = undefined, routeCfg = {}
|
||||
if (typeof item === 'string') {
|
||||
if (typeof item === 'string' && routerMap[item]) {
|
||||
router = routerMap[item]
|
||||
routeCfg = {path: router.path || item, router: item}
|
||||
} else if (typeof item === 'object') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user