diff --git a/lib/internal/streams/duplexify.js b/lib/internal/streams/duplexify.js index f75393244a6495..499e8feccbb8a1 100644 --- a/lib/internal/streams/duplexify.js +++ b/lib/internal/streams/duplexify.js @@ -7,6 +7,8 @@ const { isReadableNodeStream, isWritableNodeStream, isDuplexNodeStream, + isReadableFinished, + isWritableEnded, } = require('internal/streams/utils'); const eos = require('internal/streams/end-of-stream'); const { diff --git a/lib/internal/streams/utils.js b/lib/internal/streams/utils.js index 4cd78e4231a344..20b8676a766a07 100644 --- a/lib/internal/streams/utils.js +++ b/lib/internal/streams/utils.js @@ -75,7 +75,7 @@ function isDestroyed(stream) { const wState = stream._writableState; const rState = stream._readableState; const state = wState || rState; - return !!(stream.destroyed || stream[kDestroyed] || state?.destroyed); + return !!(stream.destroyed || state?.destroyed); } // Have been end():d.