Skip to content

Commit

Permalink
Lint: Arrow function expected no return value
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jul 27, 2019
1 parent 5535064 commit 578f0d2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/createAuthScheme.js
Expand Up @@ -184,7 +184,9 @@ module.exports = function createAuthScheme(
};

if (err) {
return onError(err);
onError(err);

return;
}

const onSuccess = (policy) => {
Expand Down Expand Up @@ -247,9 +249,11 @@ module.exports = function createAuthScheme(

// Promise support
if (!done) {
if (x && typeof x.then === 'function')
if (x && typeof x.then === 'function') {
x.then(lambdaContext.succeed).catch(lambdaContext.fail);
else if (x instanceof Error) lambdaContext.fail(x);
} else if (x instanceof Error) {
lambdaContext.fail(x);
}
}
});
},
Expand Down

0 comments on commit 578f0d2

Please sign in to comment.