Skip to content

Commit

Permalink
http2: use kEmptyObject
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#43159
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
LiviaMedeiros authored and guangwong committed Oct 10, 2022
1 parent d65d99d commit 8bf2967
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const {
const {
assertCrypto,
customInspectSymbol: kInspect,
promisify
kEmptyObject,
promisify,
} = require('internal/util');

assertCrypto();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8bf2967

Please sign in to comment.