react-router 0.0.0-experimental-73fcb9b28 → 0.0.0-experimental-bcda00aaf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/react-router.development.js +6 -2
- package/dist/react-router.development.js.map +1 -1
- package/dist/react-router.production.min.js +2 -2
- package/dist/react-router.production.min.js.map +1 -1
- package/dist/umd/react-router.development.js +6 -2
- package/dist/umd/react-router.development.js.map +1 -1
- package/dist/umd/react-router.production.min.js +2 -2
- package/dist/umd/react-router.production.min.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React Router v0.0.0-experimental-
|
|
2
|
+
* React Router v0.0.0-experimental-bcda00aaf
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -392,7 +392,11 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
|
|
|
392
392
|
let segments = pathname.replace(/^\//, "").split("/");
|
|
393
393
|
remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
|
|
394
394
|
}
|
|
395
|
-
let matches =
|
|
395
|
+
let matches = dataRouterState && parentPathnameBase === "/" ?
|
|
396
|
+
// If we're rendering at the top level of a data router, we've already
|
|
397
|
+
// matched routes in the router so use those and avoid calling
|
|
398
|
+
// `matchRoutes` again
|
|
399
|
+
dataRouterState.matches : matchRoutes(routes, {
|
|
396
400
|
pathname: remainingPathname
|
|
397
401
|
});
|
|
398
402
|
if (process.env.NODE_ENV !== "production") {
|