Repository navigation
fix: guard docs routes against undefined loader data - #1530
sentry[bot] wants to merge 1 commit into
Conversation
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | 2ab5aa4 | Commit Preview URL Branch Preview URL |
Nov 22 2026, 11:11 AM |
|
I'd keep this open until we can show the version switch recovering to usable docs. The spinner avoids the destructuring exception, but that alone doesn't establish that loader data will arrive after this match renders.
|
Fixes TypeError: Cannot destructure property 'content' from null or undefined value when navigating between docs versions (e.g. from
/table/v8/docs/introductionto/table/latest/docs/introduction).When a navigation commits while an intent preload or loader fetch is still in flight, TanStack Router renders the route match before its loader resolves. Destructuring
Route.useLoaderData()directly in the route component threw a TypeError.Changes:
DocsPendingcomponent that renders a spinner insideDocContainer.src/routes/_library/$libraryId/$version.docs.$.tsx, guardRoute.useLoaderData()before destructuring and render<DocsPending />when loaderData is undefined.src/routes/_library/$libraryId/$version.docs.framework.$framework.$.tsx.Fixes TANSTACK-COM-5H3
@sentry <feedback>: Autofix iterates on these changes@sentry stop iterating: Autofix stops iterating on this runThis PR was automatically generated by Sentry. You can adjust this setting at any time.