Skip to content

Commit

Permalink
fix: find menu children logic (#755)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaaaash authored Mar 30, 2022
1 parent 15be9fa commit 566bc4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core-browser/src/components/actions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const MenuActionList: React.FC<{
}

// hacky: read MenuNode from MenuItem.children.props
const menuItem = item.props.children[0].props.data as MenuNode;
const child = Array.isArray(item.props.children) ? item.props.children[0] : item.props.children;
const menuItem = child.props.data as MenuNode;
if (!menuItem) {
return;
}
Expand Down

0 comments on commit 566bc4b

Please sign in to comment.