Skip to content

Commit

Permalink
Revert "chore(nextjs): Update serializable props GH issue link"
Browse files Browse the repository at this point in the history
This reverts commit 7563ec7.
  • Loading branch information
nikosdouvlis committed Apr 12, 2023
1 parent 347f6df commit f16e623
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nextjs/src/middleware/utils/serializeProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function injectSSRStateIntoProps(callbackResult: any, authData: AuthData)

export const injectSSRStateIntoObject = (obj: any, authData: AuthData) => {
// Serializing the state on dev env is a temp workaround for the following issue:
// https://github.com/vercel/next.js/discussions/11209
// https://github.com/vercel/next.js/discussions/11209|Next.js
const __clerk_ssr_state =
process.env.NODE_ENV !== 'production' ? JSON.parse(JSON.stringify({ ...authData })) : { ...authData };
return { ...obj, __clerk_ssr_state };
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/src/server/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const nextJsVersionCanOverrideRequestHeaders = () => {

export const injectSSRStateIntoObject = <O, T>(obj: O, authObject: T) => {
// Serializing the state on dev env is a temp workaround for the following issue:
// https://github.com/vercel/next.js/discussions/11209
// https://github.com/vercel/next.js/discussions/11209|Next.js
const __clerk_ssr_state = (
process.env.NODE_ENV !== 'production' ? JSON.parse(JSON.stringify({ ...authObject })) : { ...authObject }
) as T;
Expand Down

0 comments on commit f16e623

Please sign in to comment.