@tanstack/router-core 1.121.2 → 1.121.14
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/index.d.cts +1 -1
- package/dist/cjs/router.cjs +1 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +6 -5
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/router.d.ts +6 -5
- package/dist/esm/router.js +1 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/router.ts +7 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/router.ts
CHANGED
|
@@ -2182,7 +2182,7 @@ export class RouterCore<
|
|
|
2182
2182
|
|
|
2183
2183
|
// Wait for the beforeLoad to resolve before we continue
|
|
2184
2184
|
await existingMatch.beforeLoadPromise
|
|
2185
|
-
executeBeforeLoad = this.getMatch(matchId)!.status
|
|
2185
|
+
executeBeforeLoad = this.getMatch(matchId)!.status === 'error'
|
|
2186
2186
|
}
|
|
2187
2187
|
if (executeBeforeLoad) {
|
|
2188
2188
|
// If we are not in the middle of a load OR the previous load failed, start it
|
|
@@ -3020,13 +3020,18 @@ interface RouteLike {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
}
|
|
3022
3022
|
|
|
3023
|
+
export type ProcessRouteTreeResult<TRouteLike extends RouteLike> = {
|
|
3024
|
+
routesById: Record<string, TRouteLike>
|
|
3025
|
+
routesByPath: Record<string, TRouteLike>
|
|
3026
|
+
flatRoutes: Array<TRouteLike>
|
|
3027
|
+
}
|
|
3023
3028
|
export function processRouteTree<TRouteLike extends RouteLike>({
|
|
3024
3029
|
routeTree,
|
|
3025
3030
|
initRoute,
|
|
3026
3031
|
}: {
|
|
3027
3032
|
routeTree: TRouteLike
|
|
3028
3033
|
initRoute?: (route: TRouteLike, index: number) => void
|
|
3029
|
-
}) {
|
|
3034
|
+
}): ProcessRouteTreeResult<TRouteLike> {
|
|
3030
3035
|
const routesById = {} as Record<string, TRouteLike>
|
|
3031
3036
|
const routesByPath = {} as Record<string, TRouteLike>
|
|
3032
3037
|
|