Skip to content

Commit 779bb7a

Browse files
committed
stream: allow pass stream class to stream.compose
1 parent 3c0ec61 commit 779bb7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/internal/streams/duplexify.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ module.exports = function duplexify(body, name) {
8484

8585
if (typeof body === 'function') {
8686
const { value, write, final, destroy } = fromAsyncGen(body);
87+
if (isDuplexNodeStream(value)) {
88+
return value;
89+
}
8790

8891
if (isIterable(value)) {
8992
return from(Duplexify, value, {

0 commit comments

Comments
 (0)