Skip to content

Commit 1b24d3a

Browse files
puzpuzpuzaddaleax
authored andcommitted
zlib: remove redundant variable in zlibBufferOnEnd
PR-URL: #34072 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 7551a8b commit 1b24d3a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/zlib.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,14 @@ function zlibBufferOnError(err) {
136136

137137
function zlibBufferOnEnd() {
138138
let buf;
139-
let err;
140139
if (this.nread === 0) {
141140
buf = Buffer.alloc(0);
142141
} else {
143142
const bufs = this.buffers;
144143
buf = (bufs.length === 1 ? bufs[0] : Buffer.concat(bufs, this.nread));
145144
}
146145
this.close();
147-
if (err)
148-
this.cb(err);
149-
else if (this._info)
146+
if (this._info)
150147
this.cb(null, { buffer: buf, engine: this });
151148
else
152149
this.cb(null, buf);

0 commit comments

Comments
 (0)