| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a32ec98 commit 53338fe
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -265,7 +265,9 @@ function pipelineImpl(streams, callback, opts) { | |||
| 265 | 265 | then.call(ret, | |
| 266 | 266 | (val) => { | |
| 267 | 267 | value = val; | |
| 268 | - pt.write(val); | ||
| 268 | + if (val != null) { | ||
| 269 | + pt.write(val); | ||
| 270 | + } | ||
| 269 | 271 | if (end) { | |
| 270 | 272 | pt.end(); | |
| 271 | 273 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1511,3 +1511,18 @@ const tsp = require('timers/promises'); | |||
| 1511 | 1511 | assert.strictEqual(s.destroyed, true); | |
| 1512 | 1512 | })); | |
| 1513 | 1513 | } | |
| 1514 | + | ||
| 1515 | + { | ||
| 1516 | + const s = new PassThrough({ objectMode: true }); | ||
| 1517 | + pipeline(async function*() { | ||
| 1518 | + await Promise.resolve(); | ||
| 1519 | + yield 'hello'; | ||
| 1520 | + yield 'world'; | ||
| 1521 | + yield 'world'; | ||
| 1522 | + }, s, async function(source) { | ||
| 1523 | + return null; | ||
| 1524 | + }, common.mustCall((err, val) => { | ||
| 1525 | + assert.strictEqual(err, undefined); | ||
| 1526 | + assert.strictEqual(val, null); | ||
| 1527 | + })); | ||
| 1528 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments