mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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:
committed by
Antoine du Hamel
parent
df68383ee9
commit
811cb8f685
@@ -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 += ':';
|
||||
|
||||
Reference in New Issue
Block a user