From eb01ad583fc789dcb0890ff00d09a26aeb63b8c7 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Wed, 25 Oct 2017 16:04:27 -0700 Subject: [PATCH] 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 --- packages/common/http/src/client.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/common/http/src/client.ts b/packages/common/http/src/client.ts index 042ba5a8c9..896974ddb1 100644 --- a/packages/common/http/src/client.ts +++ b/packages/common/http/src/client.ts @@ -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.