From 0ba1c3d5c780f633ad9e1851550db879fe1d04c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=AB=E9=9B=A8=E6=B0=B4=E8=BF=87=E6=BB=A4=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=B0=94-Rain?= <958414905@qq.com> Date: Wed, 12 Jul 2023 16:31:23 +0800 Subject: [PATCH] fix: avoid crashing when delete group menu (#2239) --- packages/core/client/src/schema-component/antd/menu/Menu.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/menu/Menu.tsx b/packages/core/client/src/schema-component/antd/menu/Menu.tsx index c8afbbcfe..9d8189f6d 100644 --- a/packages/core/client/src/schema-component/antd/menu/Menu.tsx +++ b/packages/core/client/src/schema-component/antd/menu/Menu.tsx @@ -392,7 +392,8 @@ export const Menu: ComposedMenu = observer( if (mode === 'mix' && key) { const s = schema.properties?.[key]; - if (s['x-component'] === 'Menu.SubMenu') { + // fix T-934 + if (s?.['x-component'] === 'Menu.SubMenu') { return s; } }