From 8bf29673cb4a948562efd5bf6d16bd330fc647e6 Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Sat, 21 May 2022 17:53:04 +0800 Subject: [PATCH] http2: use `kEmptyObject` PR-URL: https://github.com/nodejs/node/pull/43159 Reviewed-By: Matteo Collina Reviewed-By: Antoine du Hamel --- lib/internal/http2/core.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 2ea9c01cccb..b2c8b147b56 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(); @@ -3323,7 +3324,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);