Skip to content

Commit 87a613a

Browse files
πŸ› bug: fix title=false,will throw warning (#322)
* πŸ› bug: fix title=false,will throw warning * remove // @ts-ignore * fix test * close import/no-extraneous-dependencies * update review
1 parent 03f7e9c commit 87a613a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

β€Ž.eslintrc.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
...base,
55
rules: {
66
...base.rules,
7+
'import/no-extraneous-dependencies': 0,
78
'import/no-named-as-default': 0,
89
'no-template-curly-in-string': 0,
910
'prefer-promise-reject-errors': 0,

β€Žsrc/MenuItem.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
178178
'aria-selected'?: boolean;
179179
} = {
180180
...props.attribute,
181-
title: props.title,
181+
title: typeof props.title === 'string' ? props.title : undefined,
182182
className,
183183
// set to menuitem by default
184184
role: props.role || 'menuitem',

0 commit comments

Comments
Β (0)