fix(common): remove useless guard in HttpClient (#19958)

An invalid "if" condition is always true, and is thus useless. This
change removes it. No behavior changes.

Fixes #19223.

PR Close #19958
This commit is contained in:
Alex Rickabaugh 2017-10-25 16:04:27 -07:00 committed by Miško Hevery
parent 15a54df7d3
commit eb01ad583f
1 changed files with 4 additions and 6 deletions

View File

@ -352,12 +352,10 @@ export class HttpClient {
// Figure out the headers. // Figure out the headers.
let headers: HttpHeaders|undefined = undefined; let headers: HttpHeaders|undefined = undefined;
if (!!options.headers !== undefined) { if (options.headers instanceof HttpHeaders) {
if (options.headers instanceof HttpHeaders) { headers = options.headers;
headers = options.headers; } else {
} else { headers = new HttpHeaders(options.headers);
headers = new HttpHeaders(options.headers);
}
} }
// Sort out parameters. // Sort out parameters.