Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Fix repeated dialog names in route
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed Oct 2, 2017
1 parent 178696b commit cb37b14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/relativeLink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const RelativeLink = ({
if (disableWhenOffline !== undefined) style += `${offlineStyle.disableWhenOffline} `;
if (style !== '') style += ` ${buttonStyle.button}`;

const path = `${location.pathname}/${to}`.replace('//', '/');
const path = location.pathname.indexOf(`/${to}`) < 0 ? `${location.pathname}/${to}`.replace('//', '/') : location.pathname;
return (
<Link className={`${className} ${style}`} to={path}>{ children }</Link>
);
Expand Down

0 comments on commit cb37b14

Please sign in to comment.