Skip to content

Commit

Permalink
fix(remix): Add duplex when sending a body
Browse files Browse the repository at this point in the history
  • Loading branch information
octoper committed Jun 12, 2024
1 parent 79a3290 commit 4955a65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/remix/src/ssr/authenticateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function authenticateRequest(
const { signInUrl, signUpUrl, afterSignInUrl, afterSignUpUrl } = opts;

// RequestInit#duplex option is required when sending a body.
if (request?.body instanceof ReadableStream) {
if (request?.body) {
(request as unknown as { duplex: 'half' }).duplex = 'half';
}

Expand Down

0 comments on commit 4955a65

Please sign in to comment.