提交 3683e0dd 编写于 作者: W WhatAKitty 提交者: ddcat1115

Fix warning of applying `bool` into onClick prop (#521)

fix warning: Failed prop type: Invalid prop `onClick` of type `boolean` supplied to `Link`, expected `function`
上级 d9d02c35
......@@ -105,7 +105,7 @@ export default class SiderMenu extends PureComponent {
to={itemPath}
target={item.target}
replace={itemPath === this.props.location.pathname}
onClick={this.props.isMobile && (() => { this.props.onCollapse(true); })}
onClick={this.props.isMobile ? () => { this.props.onCollapse(true); } : undefined}
>
{icon}<span>{item.name}</span>
</Link>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册