diff --git a/lib/internal/streams/utils.js b/lib/internal/streams/utils.js index 983088e6ba5d0c..d35744f26b7980 100644 --- a/lib/internal/streams/utils.js +++ b/lib/internal/streams/utils.js @@ -119,14 +119,14 @@ function isReadableFinished(stream, strict) { function isReadable(stream) { if (stream && stream[kIsReadable] != null) return stream[kIsReadable]; const r = isReadableNodeStream(stream); - if (r === null || typeof stream?.readable !== 'boolean') return null; + if (typeof stream?.readable !== 'boolean') return null; if (isDestroyed(stream)) return false; return r && stream.readable && !isReadableFinished(stream); } function isWritable(stream) { const r = isWritableNodeStream(stream); - if (r === null || typeof stream?.writable !== 'boolean') return null; + if (typeof stream?.writable !== 'boolean') return null; if (isDestroyed(stream)) return false; return r && stream.writable && !isWritableEnded(stream); }