http: add default argument for Agent.prototype.getName

PR-URL: https://github.com/nodejs/node/pull/41906
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
This commit is contained in:
小菜 authored and Danielle Adams committed 2022-04-23 22:47:08 -04:00
1 parent 29fd5ff37d
commit 16c00c6ac8
5 files changed
+20 -4

No files matched your search

+1 -1
View File
@@ -203,7 +203,7 @@ Agent.prototype.createConnection = createConnection;
* }} [options]
* @returns {string}
*/
Agent.prototype.getName = function getName(options) {
Agent.prototype.getName = function getName(options = {}) {
let name = FunctionPrototypeCall(HttpAgent.prototype.getName, this, options);
name += ':';