react-router 6.28.2 → 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/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v6.28.2
2
+ * React Router v6.28.3-pre-v6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v6.28.2
2
+ * React Router v6.28.3-pre-v6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -279,7 +279,8 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
279
279
  // router loaded. We can help them understand how to avoid that.
280
280
  `useRoutes() may be used only in the context of a <Router> component.`) : void 0;
281
281
  let {
282
- navigator
282
+ navigator,
283
+ static: isStatic
283
284
  } = React.useContext(NavigationContext);
284
285
  let {
285
286
  matches: parentMatches
@@ -343,7 +344,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
343
344
  let segments = pathname.replace(/^\//, "").split("/");
344
345
  remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
345
346
  }
346
- let matches = matchRoutes(routes, {
347
+ let matches = !isStatic && dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, {
347
348
  pathname: remainingPathname
348
349
  });
349
350
  {