Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zlib.js')
-rw-r--r--lib/zlib.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/zlib.js b/lib/zlib.js
index be8f9401a31..1c317af46d1 100644
--- a/lib/zlib.js
+++ b/lib/zlib.js
@@ -762,15 +762,14 @@ function createConvenienceMethod(ctor, sync) {
return function syncBufferWrapper(buffer, opts) {
return zlibBufferSync(new ctor(opts), buffer);
};
- } else {
- return function asyncBufferWrapper(buffer, opts, callback) {
- if (typeof opts === 'function') {
- callback = opts;
- opts = {};
- }
- return zlibBuffer(new ctor(opts), buffer, callback);
- };
}
+ return function asyncBufferWrapper(buffer, opts, callback) {
+ if (typeof opts === 'function') {
+ callback = opts;
+ opts = {};
+ }
+ return zlibBuffer(new ctor(opts), buffer, callback);
+ };
}
const kMaxBrotliParam = MathMax(...ObjectKeys(constants).map((key) => {