From aded3f3ea56a3cf3bd0534d956ea7d3181062b2f Mon Sep 17 00:00:00 2001 From: greenhat616 Date: Mon, 24 May 2021 02:16:14 +0800 Subject: [PATCH] fix: lint --- util/request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/request.js b/util/request.js index dce4ee7..9211aff 100644 --- a/util/request.js +++ b/util/request.js @@ -127,7 +127,7 @@ const createRequest = (method, url, data, options) => { settings.httpAgent = new PacProxyAgent(options.proxy) settings.httpsAgent = new PacProxyAgent(options.proxy) } else { - var purl = qs.parse(options.proxy) + const purl = qs.parse(options.proxy) if (purl.hostname) { const agent = tunnel.httpsOverHttp({ proxy: { @@ -184,7 +184,7 @@ const createRequest = (method, url, data, options) => { answer.status = 100 < answer.status && answer.status < 600 ? answer.status : 400 - if (answer.status == 200) resolve(answer) + if (answer.status === 200) resolve(answer) else reject(answer) }) .catch((err) => { -- GitLab