Skip to content

Commit

Permalink
Fix undefined this._request issue
Browse files Browse the repository at this point in the history
Fixes #2390
  • Loading branch information
johnlinp committed Nov 23, 2024
1 parent 3034c2f commit 5f53a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export default class Request extends Duplex implements RequestEvents<Request> {
this._request.end((error?: Error | null) => { // eslint-disable-line @typescript-eslint/ban-types
// The request has been destroyed before `_final` finished.
// See https://github.com/nodejs/node/issues/39356
if ((this._request as any)._writableState?.errored) {
if ((this._request as any)?._writableState?.errored) {
return;
}

Expand Down

0 comments on commit 5f53a04

Please sign in to comment.