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 Michaël Zasso committed 2022-07-31 09:44:29 +02:00
1 parent 95083cb0ad
commit 4fbedffb55
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');
@@ -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 += ':';