diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SiderMenu.js index e4ea989c56d12b517bd573675d899c0fae4fe6a1..a3a6708f6ac12d7d951edd7a82d2cab6474275b5 100644 --- a/src/components/SiderMenu/SiderMenu.js +++ b/src/components/SiderMenu/SiderMenu.js @@ -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}{item.name}