You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node crashes if undefined passed to an objectMode readable stream #13753
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?
this is error when running the above script on node v8.1.2:
$ node tmp/issue.js
_stream_readable.js:218
Object.getPrototypeOf(chunk) !== Buffer.prototype &&
^
TypeError: Cannot convert undefined or null to object
at Function.getPrototypeOf (<anonymous>)
at readableAddChunk (_stream_readable.js:218:18)
at Transform.Readable.push (_stream_readable.js:197:10)
at Transform.push (_stream_transform.js:151:32)
at Transform.stream._transform (/Users/lloydb/Documents/tmp/issue.js:8:10)
at Transform._read (_stream_transform.js:190:10)
at Transform._write (_stream_transform.js:178:12)
at doWrite (_stream_writable.js:371:12)
at writeOrBuffer (_stream_writable.js:357:5)
at Transform.Writable.write (_stream_writable.js:274:11)
Activity
75lb commentedon Jun 17, 2017
this is error when running the above script on node v8.1.2:
gibfahn commentedon Jun 17, 2017
cc/ @nodejs/streams
stream: fix `undefined` in Readable object mode