https: use kEmptyObject

PR-URL: https://github.com/nodejs/node/pull/43159
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
LiviaMedeiros authored and Danielle Adams committed 2022-06-12 20:24:54 -04:00
1 parent 2ffd54105a
commit b468b8fe51
1 file changed
+6 -2
+6 -2
View File
@@ -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');
@@ -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 += ':';