We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
path="/"
match.url === ''
1 parent 8c0d9b9 commit 91ea6c8Copy full SHA for 91ea6c8
packages/react-router/modules/matchPath.js
@@ -46,7 +46,7 @@ const matchPath = (pathname, path, options={}) => {
46
47
return {
48
path, // the path pattern used to match
49
- url, // the matched portion of the URL
+ url: path === '/' && url === '' ? '/' : url, // the matched portion of the URL
50
isExact, // whether or not we matched exactly
51
params: keys.reduce((memo, key, index) => {
52
memo[key.name] = values[index]
0 commit comments