Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[fix] Check for self.chunks before operating on it #29

Merged
merged 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 11, 2012
  1. @pksunkara
This page is out of date. Refresh to see the latest.
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) {
Something went wrong with that request. Please try again.