mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(react-router): return '/' instead of '' for pathnameBase at root in relative path matching
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user