Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(next): bind new stream functions with base incomingMessage object #37806

Merged
merged 9 commits into from
Jun 27, 2022
2 changes: 1 addition & 1 deletion packages/next/server/body-streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function replaceRequestBody<T extends IncomingMessage>(
for (const key in stream) {
let v = stream[key as keyof Readable] as any
if (typeof v === 'function') {
v = v.bind(stream)
v = v.bind(base)
}
base[key as keyof T] = v
}
Expand Down