From 24dd731969e6a2d177d45638c60843609b47630e Mon Sep 17 00:00:00 2001 From: Vinson Chuong Date: Wed, 5 Apr 2023 20:25:12 -0700 Subject: [PATCH] test(xo): Fix linting errors --- lib/http/send-request.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/http/send-request.js b/lib/http/send-request.js index 4fa3cc72..6c0013c8 100644 --- a/lib/http/send-request.js +++ b/lib/http/send-request.js @@ -13,11 +13,7 @@ export default async function (request) { // eslint-disable-next-line unicorn/no-array-for-each fetchResponse.headers.forEach((value, key) => { - if (headers[key]) { - headers[key] = `${headers[key]}, ${value}` - } else { - headers[key] = value - } + headers[key] = headers[key] ? `${headers[key]}, ${value}` : value }) return {