Skip to content

Commit fb82137

Browse files
committed
handle different returns
1 parent 36457b9 commit fb82137

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/async.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module.exports = function (password, salt, iterations, keylen, digest, callback)
9393
var algo = toBrowser[digest.toLowerCase()]
9494

9595
if (!algo || typeof global.Promise !== 'function') {
96-
return getNextTick()(function () {
96+
getNextTick()(function () {
9797
var out
9898
try {
9999
out = sync(password, salt, iterations, keylen, digest)
@@ -102,6 +102,7 @@ module.exports = function (password, salt, iterations, keylen, digest, callback)
102102
}
103103
callback(null, out)
104104
})
105+
return
105106
}
106107

107108
checkParameters(iterations, keylen)

0 commit comments

Comments
 (0)