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:
parent
15a54df7d3
commit
eb01ad583f
|
@ -352,12 +352,10 @@ export class HttpClient {
|
|||
|
||||
// Figure out the headers.
|
||||
let headers: HttpHeaders|undefined = undefined;
|
||||
if (!!options.headers !== undefined) {
|
||||
if (options.headers instanceof HttpHeaders) {
|
||||
headers = options.headers;
|
||||
} else {
|
||||
headers = new HttpHeaders(options.headers);
|
||||
}
|
||||
if (options.headers instanceof HttpHeaders) {
|
||||
headers = options.headers;
|
||||
} else {
|
||||
headers = new HttpHeaders(options.headers);
|
||||
}
|
||||
|
||||
// Sort out parameters.
|
||||
|
|
Loading…
Reference in New Issue