Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskolodny committed Oct 3, 2023
1 parent e7efbbd commit 810caa6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,11 @@ export const Menu: React.FC<MenuProps> = ({
});

React.useEffect(() => {
if (target) {
target.setAttribute('role', 'menu');
target.setAttribute('aria-expanded', String(isMenuOpen));
if (menu) {
menu.setAttribute('role', 'menu');
menu.setAttribute('aria-expanded', String(isMenuOpen));
}
}, [target, isMenuOpen]);
}, [menu, isMenuOpen]);

return (
<div {...getPrefixedDataAttributes(dataAttributes, 'Menu')}>
Expand Down

0 comments on commit 810caa6

Please sign in to comment.