Skip to content

Commit

Permalink
https: 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 2ffd541 commit b468b8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/https.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ const {
ReflectConstruct,
} = primordials;

require('internal/util').assertCrypto();
const {
assertCrypto,
kEmptyObject,
} = require('internal/util');
assertCrypto();

const tls = require('tls');
const { Agent: HttpAgent } = require('_http_agent');
Expand Down Expand Up @@ -206,7 +210,7 @@ Agent.prototype.createConnection = createConnection;
* }} [options]
* @returns {string}
*/
Agent.prototype.getName = function getName(options = {}) {
Agent.prototype.getName = function getName(options = kEmptyObject) {
let name = FunctionPrototypeCall(HttpAgent.prototype.getName, this, options);

name += ':';
Expand Down

0 comments on commit b468b8f

Please sign in to comment.