react-router 6.28.3-pre-v6.0 → 6.28.3-pre-v6.1
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/CHANGELOG.md +6 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/react-router.development.js +4 -3
- 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 +4 -3
- 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 +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React Router v6.28.3-pre-v6.
|
|
2
|
+
* React Router v6.28.3-pre-v6.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -327,7 +327,8 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
|
|
|
327
327
|
// router loaded. We can help them understand how to avoid that.
|
|
328
328
|
"useRoutes() may be used only in the context of a <Router> component.") : UNSAFE_invariant(false) : void 0;
|
|
329
329
|
let {
|
|
330
|
-
navigator
|
|
330
|
+
navigator,
|
|
331
|
+
static: isStatic
|
|
331
332
|
} = React.useContext(NavigationContext);
|
|
332
333
|
let {
|
|
333
334
|
matches: parentMatches
|
|
@@ -392,7 +393,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
|
|
|
392
393
|
let segments = pathname.replace(/^\//, "").split("/");
|
|
393
394
|
remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
|
|
394
395
|
}
|
|
395
|
-
let matches = dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, {
|
|
396
|
+
let matches = !isStatic && dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, {
|
|
396
397
|
pathname: remainingPathname
|
|
397
398
|
});
|
|
398
399
|
if (process.env.NODE_ENV !== "production") {
|