Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b468b8f

Browse filesBrowse files
LiviaMedeirosdanielleadams
authored andcommitted
https: use kEmptyObject
PR-URL: #43159 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 2ffd541 commit b468b8f
Copy full SHA for b468b8f

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Collapse file

‎lib/https.js‎

Copy file name to clipboardExpand all lines: lib/https.js
+6-2Lines 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');
@@ -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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.