From 7df5129cd78a25f3f3e86746761d0fc86691587b Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 15 Oct 2022 11:09:06 +0800 Subject: [PATCH] fix(client/route-switch): skip sub routes --- .../core/client/src/route-switch/antd/admin-layout/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx index 07adf5e65e..62e0e7272a 100644 --- a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx +++ b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx @@ -77,6 +77,9 @@ const MenuEditor = (props) => { onSuccess(data) { const schema = filterByACL(data?.data, ctx); if (defaultSelectedUid) { + if (defaultSelectedUid.includes('/')) { + return; + } const s = findByUid(schema, defaultSelectedUid); if (s) { setTitle(s.title);