diff --git a/lib/core/request.js b/lib/core/request.js index 1b938bd5747..7db05ce65ae 100644 --- a/lib/core/request.js +++ b/lib/core/request.js @@ -119,7 +119,8 @@ class Request { } else if (util.isStream(body)) { this.body = body - if (!this.body._readableState?.autoDestroy) { + const rState = this.body._readableState + if (!rState || !rState.autoDestroy) { this.endHandler = function autoDestroy () { util.destroy(this) }