Skip to content

Commit b4bc4df

Browse files
LiviaMedeirosguangwong
authored andcommitted
https: use kEmptyObject
PR-URL: nodejs/node#43159 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 8bf2967 commit b4bc4df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/https.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ const {
3434
ReflectConstruct,
3535
} = primordials;
3636

37-
require('internal/util').assertCrypto();
37+
const {
38+
assertCrypto,
39+
kEmptyObject,
40+
} = require('internal/util');
41+
assertCrypto();
3842

3943
const tls = require('tls');
4044
const { Agent: HttpAgent } = require('_http_agent');
@@ -203,7 +207,7 @@ Agent.prototype.createConnection = createConnection;
203207
* }} [options]
204208
* @returns {string}
205209
*/
206-
Agent.prototype.getName = function getName(options = {}) {
210+
Agent.prototype.getName = function getName(options = kEmptyObject) {
207211
let name = FunctionPrototypeCall(HttpAgent.prototype.getName, this, options);
208212

209213
name += ':';

0 commit comments

Comments
 (0)