We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7551a8b commit 1b24d3aCopy full SHA for 1b24d3a
lib/zlib.js
@@ -136,17 +136,14 @@ function zlibBufferOnError(err) {
136
137
function zlibBufferOnEnd() {
138
let buf;
139
- let err;
140
if (this.nread === 0) {
141
buf = Buffer.alloc(0);
142
} else {
143
const bufs = this.buffers;
144
buf = (bufs.length === 1 ? bufs[0] : Buffer.concat(bufs, this.nread));
145
}
146
this.close();
147
- if (err)
148
- this.cb(err);
149
- else if (this._info)
+ if (this._info)
150
this.cb(null, { buffer: buf, engine: this });
151
else
152
this.cb(null, buf);
0 commit comments