Skip to content

Commit

Permalink
https: 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 8bf2967 commit b4bc4df
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 @@ -203,7 +207,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 b4bc4df

Please sign in to comment.