Skip to content

Commit

Permalink
fix globalThis.__BLITZ_GET_RSC_CONTEXT being overriden
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhsuresh committed Nov 28, 2023
1 parent 4236c9a commit 2119470
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/blitz-auth/src/server/auth-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ export const AuthServerPlugin = createServerPlugin((options: AuthPluginOptions)
}
return blitzSessionMiddleware
}
globalThis.__BLITZ_GET_RSC_CONTEXT = getBlitzContext
if (!globalThis.__BLITZ_GET_RSC_CONTEXT) {
globalThis.__BLITZ_GET_RSC_CONTEXT = getBlitzContext
}
return {
requestMiddlewares: [authPluginSessionMiddleware()],
exports: () => ({
Expand Down

0 comments on commit 2119470

Please sign in to comment.