From d8b400f9914b07238ac20bed1a9079ce737ede93 Mon Sep 17 00:00:00 2001 From: Oleksii Sribnyi Date: Thu, 28 Nov 2019 11:22:24 +0100 Subject: [PATCH] Fix linting errors --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index c27cb08..36c7b5b 100644 --- a/index.js +++ b/index.js @@ -293,7 +293,7 @@ function onChallenge (options, response, body) { match = body.match(/name="(.+?)" value="(.+?)"/); if (match) { - let hiddenInputName = match[1]; + const hiddenInputName = match[1]; payload[hiddenInputName] = match[2]; } @@ -358,7 +358,7 @@ function onChallenge (options, response, body) { options.headers.Referer = uri.href; // Check is form to be submitted via GET or POST match = body.match(/id="challenge-form" action="(.+?)" method="(.+?)"/); - if(match && match[2] && match[2] === 'POST') { + if (match && match[2] && match[2] === 'POST') { options.uri = uri.protocol + '//' + uri.host + match[1]; // Pass the payload using body form options.form = payload; @@ -369,7 +369,7 @@ function onChallenge (options, response, body) { // Pass the payload using query string options.qs = payload; } - // Decrement the number of challenges to solve. + // Decrement the number of challenges to solve. options.challengesToSolve -= 1; // baseUrl can't be used in conjunction with an absolute uri if (options.baseUrl !== undefined) {