Skip to content

Commit

Permalink
Revert "fix(tanstack-start): Merge router context instead of updating (
Browse files Browse the repository at this point in the history
…#4425)"

This reverts commit 915b257.
  • Loading branch information
octoper authored Oct 30, 2024
1 parent 915b257 commit dac21ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .changeset/silly-moose-tease.md

This file was deleted.

6 changes: 4 additions & 2 deletions packages/tanstack-start/src/server/middlewareHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ export function createClerkHandler<TRouter extends AnyRouter>(

const clerkInitialState = getResponseClerkState(requestState, loadedOptions);

// Merging the TanStack router context with the Clerk context and loading the router
// Updating the TanStack router context with the Clerk context and loading the router
router.update({
context: { ...router.options.context, ...clerkInitialState },
context: clerkInitialState,
});

await router.load();
} catch (error) {
if (error instanceof Response) {
// returning the response
Expand Down

0 comments on commit dac21ed

Please sign in to comment.