@tanstack/react-router 1.58.1 → 1.58.2

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/react-router",
3
- "version": "1.58.1",
3
+ "version": "1.58.2",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/router.ts CHANGED
@@ -2275,11 +2275,6 @@ export class Router<
2275
2275
  componentsPromise,
2276
2276
  }))
2277
2277
 
2278
- // Lazy option can modify the route options,
2279
- // so we need to wait for it to resolve before
2280
- // we can use the options
2281
- await route._lazyPromise
2282
-
2283
2278
  // Kick off the loader!
2284
2279
  let loaderData =
2285
2280
  await route.options.loader?.(getLoaderContext())
@@ -2300,6 +2295,11 @@ export class Router<
2300
2295
  loaderData,
2301
2296
  )
2302
2297
 
2298
+ // Lazy option can modify the route options,
2299
+ // so we need to wait for it to resolve before
2300
+ // we can use the options
2301
+ await route._lazyPromise
2302
+
2303
2303
  await potentialPendingMinPromise()
2304
2304
 
2305
2305
  const meta = route.options.meta?.({