Commit c0c65a0f authored by afc163's avatar afc163

Fix same path warning

close #159

ref ReactTraining/react-router#4467
parent d4f10ee5
...@@ -151,7 +151,11 @@ class BasicLayout extends React.PureComponent { ...@@ -151,7 +151,11 @@ class BasicLayout extends React.PureComponent {
{icon}<span>{item.name}</span> {icon}<span>{item.name}</span>
</a> </a>
) : ( ) : (
<Link to={itemPath} target={item.target}> <Link
to={itemPath}
target={item.target}
replace={itemPath === this.props.location.pathname}
>
{icon}<span>{item.name}</span> {icon}<span>{item.name}</span>
</Link> </Link>
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment