fix: avoid crashing when delete group menu (#2239)

This commit is contained in:
被雨水过滤的空气-Rain 2023-07-12 16:31:23 +08:00 committed by GitHub
parent 57507b310e
commit 0ba1c3d5c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}