Skip to content

Commit

Permalink
Fix same path warning
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Nov 12, 2017
1 parent d4f10ee commit c0c65a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/layouts/BasicLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)
Expand Down

0 comments on commit c0c65a0

Please sign in to comment.