From c1b1de8e98c8831d1f8837942d466a7e62b0eaf3 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 31 Oct 2023 09:18:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=81=B6=E5=B0=94=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8E=E9=9C=80=E8=A6=81=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E6=89=8D=E8=83=BD=E8=BF=9B=E5=85=A5=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/store/modules/permission.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/core-frontend/src/store/modules/permission.ts b/core/core-frontend/src/store/modules/permission.ts index 8686ec61ee..5aca217d58 100644 --- a/core/core-frontend/src/store/modules/permission.ts +++ b/core/core-frontend/src/store/modules/permission.ts @@ -95,6 +95,9 @@ export const pathValid = path => { * @returns */ const hasCurrentRouter = (locations, routers, index) => { + if (!routers?.length) { + return false + } const location = locations[index] let kids = [] const isvalid = routers.some(router => {