fixes error when trying to access this._reads in chunkstream.js (#147)

This commit is contained in:
divdavem 2020-04-15 21:04:48 +02:00 committed by GitHub
parent 2c7b959a73
commit 792e432c9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");