From dcb3efa27f2f84df0b27f9d82aeff0e6daac4624 Mon Sep 17 00:00:00 2001 From: German Lena Date: Tue, 17 Jan 2017 13:25:52 -0300 Subject: [PATCH] fix undefined variable --- .eslintrc | 3 +++ src/web-auth/index.js | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.eslintrc b/.eslintrc index 98663c88..f7e980b8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,6 +7,9 @@ "rules": { "func-names": "off", "no-underscore-dangle": "off", + "no-prototype-builtins": "off", + "no-param-reasign": "off", + "vars-on-top": "off", "compat/compat": "error" } } diff --git a/src/web-auth/index.js b/src/web-auth/index.js index 5517accc..19616758 100644 --- a/src/web-auth/index.js +++ b/src/web-auth/index.js @@ -82,10 +82,10 @@ function WebAuth(options) { WebAuth.prototype.parseHash = function (options, cb) { var parsedQs; var err; - var token; var state; var transaction; var transactionNonce; + var transactionState; if (!cb && typeof options === 'function') { cb = options; @@ -128,9 +128,9 @@ WebAuth.prototype.parseHash = function (options, cb) { parsedQs.id_token, transactionState, transactionNonce, - function (error, payload) { - if (error) { - return cb(error); + function (validationError, payload) { + if (validationError) { + return cb(validationError); } return cb(null, buildParseHashResponse(parsedQs, (transaction && transaction.appStatus) || null, payload));