Skip to content

Commit

Permalink
fix(react): headerMenu requiring isActive prop #15351 (#15494)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuri-sun authored Jan 16, 2024
1 parent c3b1964 commit d356214
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/react/src/components/UIShell/HeaderMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,11 @@ class HeaderMenu extends React.Component {
const hasActiveDescendant = (childrenArg) =>
React.Children.toArray(childrenArg).some(
(child) =>
child.props.isActive ||
child.props.isCurrentPage ||
(child.props.children instanceof Array &&
hasActiveDescendant(child.props.children))
child.props &&
(child.props.isActive ||
child.props.isCurrentPage ||
(child.props.children instanceof Array &&
hasActiveDescendant(child.props.children)))
);

const accessibilityLabel = {
Expand Down

0 comments on commit d356214

Please sign in to comment.