diff --git a/src/components/relativeLink/index.js b/src/components/relativeLink/index.js index 2fed0127b..ed06e619a 100644 --- a/src/components/relativeLink/index.js +++ b/src/components/relativeLink/index.js @@ -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 ( { children } );