-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
- Version: v8.1.2
- Platform: Darwin mbp.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
- Subsystem: Stream
The following code works on node v7 but crashes on v8:
const Transform = require('stream').Transform
const stream = new Transform({ objectMode: true })
function processChunk (chunk) { return undefined }
stream._transform = function (chunk, enc, done) {
if (chunk) {
this.push(processChunk(chunk))
}
done()
}
stream.end({ something: 'whatever' })Node crashes if my processChunk function returns undefined (which it always does for the purpose of this test case), any other value works fine. However, the docs say that "For object mode streams, chunk may be any JavaScript value." If this is true, undefined should work fine, no?
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.