diff --git a/src/lib/components/tabsv2/Tabsv2.component.tsx b/src/lib/components/tabsv2/Tabsv2.component.tsx index 11d0d31128..8ace5769ab 100644 --- a/src/lib/components/tabsv2/Tabsv2.component.tsx +++ b/src/lib/components/tabsv2/Tabsv2.component.tsx @@ -108,7 +108,7 @@ function Tabs({ return `${replaceUrl}${serialize(query)}`; } - return `${replaceUrl}/${path}${serialize(query)}`; + return `${path}${serialize(query)}`; }; useEffect(() => { @@ -153,7 +153,7 @@ function Tabs({ ...childRest }: TabProps = child.props; const isSelected = selectedTabIndex === index; - const realPath = `/${path.split('/').pop()}`; + const realPath = path.startsWith('/') ? `/${path.split('/').pop()}` : path; return (