Skip to content

Commit

Permalink
http2: use kEmptyObject
Browse files Browse the repository at this point in the history
PR-URL: #43159
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
  • Loading branch information
LiviaMedeiros authored and danielleadams committed Jun 13, 2022
1 parent a4409f8 commit 2ffd541
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 @@ -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);
Expand Down

0 comments on commit 2ffd541

Please sign in to comment.