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 02405bb655..07adf5e65e 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 @@ -80,12 +80,22 @@ const MenuEditor = (props) => { const s = findByUid(schema, defaultSelectedUid); if (s) { setTitle(s.title); + } else { + const s = findMenuItem(schema); + if (s) { + history.push(`/admin/${s['x-uid']}`); + setTitle(s.title); + } else { + history.push(`/admin/`); + } } } else { const s = findMenuItem(schema); if (s) { history.push(`/admin/${s['x-uid']}`); setTitle(s.title); + } else { + history.push(`/admin/`); } } },