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 Stewart X Addison committed 2022-03-07 17:41:06 +00:00
1 parent 4c9f2b5d83
commit 041373696f
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 += ':';