diff --git a/packages/react-router/src/ReactRouter/utils/pathMatching.ts b/packages/react-router/src/ReactRouter/utils/pathMatching.ts index 623564a407..7f764ad18d 100644 --- a/packages/react-router/src/ReactRouter/utils/pathMatching.ts +++ b/packages/react-router/src/ReactRouter/utils/pathMatching.ts @@ -80,7 +80,7 @@ export const matchPath = ({ pathname, componentProps }: MatchPathOptions): PathM return { ...match, pathname: pathname, - pathnameBase: match.pathnameBase === '/' ? '' : match.pathnameBase.slice(1), + pathnameBase: match.pathnameBase === '/' ? '/' : match.pathnameBase.slice(1), pattern: { ...match.pattern, path: path,