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:
authorLiviaMedeiros <livia@cirno.name>2022-05-21 12:53:04 +0300
committerAntoine du Hamel <duhamelantoine1995@gmail.com>2022-06-11 13:18:13 +0300
commitdf68383ee9284043e3c4bba76c4111d3a9d48e13 (patch)
tree2daef2320dee4a778efca836c61b7e64b1f996c5
parenta709a7155d41228fc8a89e701db40dd66f4a9518 (diff)
http2: use `kEmptyObject`
PR-URL: https://github.com/nodejs/node/pull/43159 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
-rw-r--r--lib/internal/http2/core.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
index 9268f5ea908..d6319286fa7 100644
--- a/lib/internal/http2/core.js
+++ b/lib/internal/http2/core.js
@@ -37,7 +37,8 @@ const {
const {
assertCrypto,
customInspectSymbol: kInspect,
- promisify
+ kEmptyObject,
+ promisify,
} = require('internal/util');
assertCrypto();
@@ -3332,7 +3333,7 @@ function getPackedSettings(settings) {
return binding.packSettings();
}
-function getUnpackedSettings(buf, options = {}) {
+function getUnpackedSettings(buf, options = kEmptyObject) {
if (!isArrayBufferView(buf) || buf.length === undefined) {
throw new ERR_INVALID_ARG_TYPE('buf',
['Buffer', 'TypedArray'], buf);