Skip to content

Commit

Permalink
fix(start): make router context available in match context after hydr…
Browse files Browse the repository at this point in the history
…ation (#2598)

fixes #2593
  • Loading branch information
schiller-manuel authored Oct 20, 2024
1 parent 4f072ff commit 82c2f49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/start/src/client/serialization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function afterHydrate({ router }: { router: AnyRouter }) {
const dMatch = window.__TSR__?.matches[match.index]
if (dMatch) {
const parentMatch = router.state.matches[match.index - 1]
const parentContext = parentMatch?.context ?? {}
const parentContext = parentMatch?.context ?? router.options.context ?? {}
if (dMatch.__beforeLoadContext) {
match.__beforeLoadContext = router.options.transformer.parse(
dMatch.__beforeLoadContext,
Expand Down

0 comments on commit 82c2f49

Please sign in to comment.