Skip to content

Commit

Permalink
Merge pull request #319 from auth0/fix-undefined-variable
Browse files Browse the repository at this point in the history
Fix undefined variable
  • Loading branch information
glena authored Jan 17, 2017
2 parents dae71ef + dcb3efa commit 21da8dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
8 changes: 4 additions & 4 deletions src/web-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 21da8dd

Please sign in to comment.