Skip to content

Commit

Permalink
Remove moot condition
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Jul 2, 2021
1 parent bda47ba commit c0b5346
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions source/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,7 @@ export default class Request extends Duplex implements RequestEvents<Request> {
}
}

// TODO: Remove the next `if` when targeting Node.js 14.
if (this._request && !this.response?.complete) {
if (this._request) {
this._request.destroy();
}

Expand Down
2 changes: 1 addition & 1 deletion source/core/utils/url-to-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface LegacyUrlOptions {
auth?: string;
}

export default function urlToOPtions(url: URL | UrlWithStringQuery): LegacyUrlOptions {
export default function urlToOptions(url: URL | UrlWithStringQuery): LegacyUrlOptions {
// Cast to URL
url = url as URL;

Expand Down

0 comments on commit c0b5346

Please sign in to comment.