diff --git a/lib/chunkstream.js b/lib/chunkstream.js index 71c8ce0..95b46d4 100644 --- a/lib/chunkstream.js +++ b/lib/chunkstream.js @@ -29,7 +29,7 @@ ChunkStream.prototype.read = function (length, callback) { this._process(); // its paused and there is not enought data then ask for more - if (this._paused && this._reads.length > 0) { + if (this._paused && this._reads && this._reads.length > 0) { this._paused = false; this.emit("drain");