From cb37b143de8223fac38ea355515a46ed7ee40a45 Mon Sep 17 00:00:00 2001 From: reyraa Date: Mon, 2 Oct 2017 16:27:50 +0200 Subject: [PATCH] Fix repeated dialog names in route --- src/components/relativeLink/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } );