summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_stream.mjs
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2023-11-28 12:14:57 +0900
committerGitHub <noreply@github.com>2023-11-28 12:14:57 +0900
commit4ed9278bf4c47670d9dda61a0d6e07e82cba3992 (patch)
tree8802797d44bbc39c2e6333b69d4c8298bbef1919 /ext/node/polyfills/_stream.mjs
parent45fe3ccccfc2db9a969d2e6d258011ae96ee7d1e (diff)
fix(ext/node): fix duplexify compatibility (#21346)
Diffstat (limited to 'ext/node/polyfills/_stream.mjs')
-rw-r--r--ext/node/polyfills/_stream.mjs3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/node/polyfills/_stream.mjs b/ext/node/polyfills/_stream.mjs
index 23df11ab3..d6db3020b 100644
--- a/ext/node/polyfills/_stream.mjs
+++ b/ext/node/polyfills/_stream.mjs
@@ -4474,6 +4474,7 @@ var require_duplexify = __commonJS({
readable: false,
});
}
+
if (typeof body === "function") {
const { value, write, final, destroy } = fromAsyncGen(body);
if (isIterable(value)) {
@@ -4669,8 +4670,6 @@ var require_duplexify = __commonJS({
cb(err);
} else if (err) {
d.destroy(err);
- } else if (!readable && !writable) {
- d.destroy();
}
}
d = new Duplexify({