From bb7fa9abb6dacf241a3f33ff461b9e7e829b3d21 Mon Sep 17 00:00:00 2001 From: chenghongxing <1126263215@qq.com> Date: Mon, 5 Apr 2021 09:51:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=BC=82=E6=AD=A5?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E5=8A=A0=E8=BD=BD=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9B=20fix:=20the=20loading=20exception=20of=20as?= =?UTF-8?q?ync=20routes;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/routerUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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