Skip to content

Commit

Permalink
handle different returns
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmetcalf committed Apr 8, 2021
1 parent 36457b9 commit fb82137
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module.exports = function (password, salt, iterations, keylen, digest, callback)
var algo = toBrowser[digest.toLowerCase()]

if (!algo || typeof global.Promise !== 'function') {
return getNextTick()(function () {
getNextTick()(function () {
var out
try {
out = sync(password, salt, iterations, keylen, digest)
Expand All @@ -102,6 +102,7 @@ module.exports = function (password, salt, iterations, keylen, digest, callback)
}
callback(null, out)
})
return
}

checkParameters(iterations, keylen)
Expand Down

0 comments on commit fb82137

Please # to comment.