Skip to content

Commit

Permalink
Merge pull request #134 from element-hq/return-undefined
Browse files Browse the repository at this point in the history
Make a return type compatible with React 17
  • Loading branch information
robintown authored Dec 13, 2023
2 parents 349fa1e + 07c17e1 commit 6ffa277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Menu/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const MenuItem = <C extends MenuItemElement = "button">({
onClick: onClickProp,
disabled,
...props
}: Props<C>): ReactNode => {
}: Props<C>): Exclude<ReactNode, undefined> => {
const Component = as ?? ("button" as ElementType);
const context = useContext(MenuContext);

Expand Down

0 comments on commit 6ffa277

Please sign in to comment.