Skip to content

Commit b468b8f

Browse files
LiviaMedeirosdanielleadams
authored andcommitted
https: use kEmptyObject
PR-URL: #43159 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 2ffd541 commit b468b8f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/https.js

+6-2
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');
@@ -206,7 +210,7 @@ Agent.prototype.createConnection = createConnection;
206210
* }} [options]
207211
* @returns {string}
208212
*/
209-
Agent.prototype.getName = function getName(options = {}) {
213+
Agent.prototype.getName = function getName(options = kEmptyObject) {
210214
let name = FunctionPrototypeCall(HttpAgent.prototype.getName, this, options);
211215

212216
name += ':';

0 commit comments

Comments
 (0)