react-router 6.22.3 → 6.23.0-pre.0

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.22.3
2
+ * React Router v6.23.0-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v6.22.3
2
+ * React Router v6.23.0-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -491,7 +491,7 @@ function _renderMatches(matches, parentMatches = [], dataRouterState = null, fut
491
491
  // If we have data errors, trim matches to the highest error boundary
492
492
  let errors = dataRouterState?.errors;
493
493
  if (errors != null) {
494
- let errorIndex = renderedMatches.findIndex(m => m.route.id && errors?.[m.route.id]);
494
+ let errorIndex = renderedMatches.findIndex(m => m.route.id && errors?.[m.route.id] !== undefined);
495
495
  !(errorIndex >= 0) ? UNSAFE_invariant(false, `Could not find a matching route for errors on route IDs: ${Object.keys(errors).join(",")}`) : void 0;
496
496
  renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));
497
497
  }
@@ -1342,7 +1342,8 @@ function createMemoryRouter(routes, opts) {
1342
1342
  }),
1343
1343
  hydrationData: opts?.hydrationData,
1344
1344
  routes,
1345
- mapRouteProperties
1345
+ mapRouteProperties,
1346
+ unstable_dataStrategy: opts?.unstable_dataStrategy
1346
1347
  }).initialize();
1347
1348
  }
1348
1349