Skip to content

Commit f26f71f

Browse files
committed
bytes
1 parent a95edcb commit f26f71f

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎packages/router-core/src/load-client.ts‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -380,15 +380,13 @@ async function contextualize(
380380
let context: typeof parentContext
381381
try {
382382
// Reuse the route's cached contribution while rebuilding its inheritance.
383-
const routeContext =
384-
match._ctx ||
385-
(route.options.context &&
386-
(match._ctx =
387-
route.options.context({
388-
...common,
389-
deps: match.loaderDeps,
390-
context: parentContext,
391-
} satisfies RouteContextOptions<any, any, any, any, any>) || {}))
383+
const routeContext = (match._ctx ||= route.options.context
384+
? route.options.context({
385+
...common,
386+
deps: match.loaderDeps,
387+
context: parentContext,
388+
} satisfies RouteContextOptions<any, any, any, any, any>) || {}
389+
: undefined)
392390
match.context = context = {
393391
...parentContext,
394392
...routeContext,

0 commit comments

Comments
 (0)