We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4927fed commit 105d560Copy full SHA for 105d560
lib/zlib.js
@@ -138,17 +138,14 @@ function zlibBufferOnError(err) {
138
139
function zlibBufferOnEnd() {
140
let buf;
141
- let err;
142
if (this.nread === 0) {
143
buf = Buffer.alloc(0);
144
} else {
145
const bufs = this.buffers;
146
buf = (bufs.length === 1 ? bufs[0] : Buffer.concat(bufs, this.nread));
147
}
148
this.close();
149
- if (err)
150
- this.cb(err);
151
- else if (this._info)
+ if (this._info)
152
this.cb(null, { buffer: buf, engine: this });
153
else
154
this.cb(null, buf);
0 commit comments