Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Check for self.chunks before operating on it

  • Loading branch information...
commit c4df3348ebcae2a14d063bba100a9e74e4eb7f9f 1 parent a7b354e
@pksunkara pksunkara authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/buffered-stream.js
View
8 lib/buffered-stream.js
@@ -75,9 +75,11 @@ BufferedStream.prototype.pipe = function () {
}
process.nextTick(function () {
- self.chunks.forEach(function (c) { self.emit('data', c) });
- self.size = 0;
- delete self.chunks;
+ if (self.chunks) {
+ self.chunks.forEach(function (c) { self.emit('data', c) });
+ self.size = 0;
+ delete self.chunks;
+ }
if (!self.readable) {
if (self.ended) {
Please sign in to comment.
Something went wrong with that request. Please try again.