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,13 +352,11 @@ 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.
|
||||||
let params: HttpParams|undefined = undefined;
|
let params: HttpParams|undefined = undefined;
|
||||||
|
|
Loading…
Reference in New Issue