@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/dist/cjs/router.cjs +11 -21
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +11 -21
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +14 -25
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -2930,33 +2930,22 @@ export class RouterCore<
|
|
|
2930
2930
|
}
|
|
2931
2931
|
|
|
2932
2932
|
try {
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
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
|
-
|
|
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) {
|