From bb7fa9abb6dacf241a3f33ff461b9e7e829b3d21 Mon Sep 17 00:00:00 2001
From: chenghongxing <1126263215@qq.com>
Date: 星期一, 05 四月 2021 09:51:52 +0800
Subject: [PATCH] 修复:异步路由加载异常问题; fix: the loading exception of async routes;

---
 src/utils/routerUtil.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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 @@
     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

--
Gitblit v1.9.1