Browse Source

Fix same path warning

close #159

ref ReactTraining/react-router#4467
pull/91/merge
afc163 8 years ago
parent
commit
c0c65a0f43
  1. 6
      src/layouts/BasicLayout.js

6
src/layouts/BasicLayout.js

@ -151,7 +151,11 @@ class BasicLayout extends React.PureComponent {
{icon}<span>{item.name}</span>
</a>
) : (
<Link to={itemPath} target={item.target}>
<Link
to={itemPath}
target={item.target}
replace={itemPath === this.props.location.pathname}
>
{icon}<span>{item.name}</span>
</Link>
)

Loading…
Cancel
Save