@tanstack/router-core 1.131.18 → 1.131.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/router-core",
3
- "version": "1.131.18",
3
+ "version": "1.131.19",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/router.ts CHANGED
@@ -2930,33 +2930,22 @@ export class RouterCore<
2930
2930
  }
2931
2931
 
2932
2932
  try {
2933
- await new Promise<void>((resolveAll, rejectAll) => {
2934
- ;(async () => {
2935
- try {
2936
- // Execute all beforeLoads one by one
2937
- for (let i = 0; i < innerLoadContext.matches.length; i++) {
2938
- const beforeLoad = this.handleBeforeLoad(innerLoadContext, i)
2939
- if (isPromise(beforeLoad)) await beforeLoad
2940
- }
2941
-
2942
- // Execute all loaders in parallel
2943
- const max =
2944
- innerLoadContext.firstBadMatchIndex ??
2945
- innerLoadContext.matches.length
2946
- for (let i = 0; i < max; i++) {
2947
- innerLoadContext.matchPromises.push(
2948
- this.loadRouteMatch(innerLoadContext, i),
2949
- )
2950
- }
2933
+ // Execute all beforeLoads one by one
2934
+ for (let i = 0; i < innerLoadContext.matches.length; i++) {
2935
+ const beforeLoad = this.handleBeforeLoad(innerLoadContext, i)
2936
+ if (isPromise(beforeLoad)) await beforeLoad
2937
+ }
2951
2938
 
2952
- await Promise.all(innerLoadContext.matchPromises)
2939
+ // Execute all loaders in parallel
2940
+ const max =
2941
+ innerLoadContext.firstBadMatchIndex ?? innerLoadContext.matches.length
2942
+ for (let i = 0; i < max; i++) {
2943
+ innerLoadContext.matchPromises.push(
2944
+ this.loadRouteMatch(innerLoadContext, i),
2945
+ )
2946
+ }
2947
+ await Promise.all(innerLoadContext.matchPromises)
2953
2948
 
2954
- resolveAll()
2955
- } catch (err) {
2956
- rejectAll(err)
2957
- }
2958
- })()
2959
- })
2960
2949
  const readyPromise = this.triggerOnReady(innerLoadContext)
2961
2950
  if (isPromise(readyPromise)) await readyPromise
2962
2951
  } catch (err) {