mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
zlib: remove redundant variable in zlibBufferOnEnd
PR-URL: https://github.com/nodejs/node/pull/34072 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit is contained in:
parent
90d5f35f7a
commit
da8a1ef21b
@ -138,7 +138,6 @@ function zlibBufferOnError(err) {
|
||||
|
||||
function zlibBufferOnEnd() {
|
||||
let buf;
|
||||
let err;
|
||||
if (this.nread === 0) {
|
||||
buf = Buffer.alloc(0);
|
||||
} else {
|
||||
@ -146,9 +145,7 @@ function zlibBufferOnEnd() {
|
||||
buf = (bufs.length === 1 ? bufs[0] : Buffer.concat(bufs, this.nread));
|
||||
}
|
||||
this.close();
|
||||
if (err)
|
||||
this.cb(err);
|
||||
else if (this._info)
|
||||
if (this._info)
|
||||
this.cb(null, { buffer: buf, engine: this });
|
||||
else
|
||||
this.cb(null, buf);
|
||||
|
Loading…
Reference in New Issue
Block a user