Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Moore <polaris@northhorizon.net>2013-04-29 17:25:08 +0400
committerisaacs <i@izs.me>2013-05-08 22:59:28 +0400
commit1ad93a65844e6bf5c87fb4c5ca46f9c7fb2ebc9f (patch)
treeed5c19ade6144e8e69b5116789f52a191a711550 /lib
parentcf87ee67eed4409bdd14a4d75b5d7053328cce91 (diff)
stream: make Readable.wrap support objectMode
Added a check to see if the stream is in objectMode before deciding whether to include or exclude data from an old-style wrapped stream.
Diffstat (limited to 'lib')
-rw-r--r--lib/_stream_readable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
index 070628288ee..63babe42655 100644
--- a/lib/_stream_readable.js
+++ b/lib/_stream_readable.js
@@ -767,7 +767,7 @@ Readable.prototype.wrap = function(stream) {
stream.on('data', function(chunk) {
if (state.decoder)
chunk = state.decoder.write(chunk);
- if (!chunk || !chunk.length)
+ if (!chunk || !state.objectMode && !chunk.length)
return;
var ret = self.push(chunk);