diff --git a/lib/stream.js b/lib/stream.js index 6ab1f895d8..47a355b76f 100644 --- a/lib/stream.js +++ b/lib/stream.js @@ -23,9 +23,7 @@ Stream.prototype.pipe = function (dest, options) { * source gets the 'end' event. */ - options.end = options && options.end === false ? false : true; - - if (options.end) { + if (!options || options.end === false) { source.on("end", function () { dest.end(); });