Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Mar 29, 2024
1 parent cdad2e1 commit d8714c5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/agent-base/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ export abstract class Agent extends http.Agent {
// In order to properly update the socket pool, we need to call `getName()` on
// the core `https.Agent` if it is a secureEndpoint.
private getName({ secureEndpoint, ...options }: AgentConnectOpts) {
return secureEndpoint
? // @ts-expect-error `getName()` isn't defined in `@types/node`
HttpsAgent.prototype.getName.call(this, options)
: // @ts-expect-error `getName()` isn't defined in `@types/node`
super.getName(options);
if (secureEndpoint) {
// @ts-expect-error `getName()` isn't defined in `@types/node`
return HttpsAgent.prototype.getName.call(this, options);
}
// @ts-expect-error `getName()` isn't defined in `@types/node`
return super.getName(options);
}

createSocket(
Expand Down

0 comments on commit d8714c5

Please sign in to comment.