diff --git a/lib/async.js b/lib/async.js index 29962c3..3af2c49 100644 --- a/lib/async.js +++ b/lib/async.js @@ -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) @@ -102,6 +102,7 @@ module.exports = function (password, salt, iterations, keylen, digest, callback) } callback(null, out) }) + return } checkParameters(iterations, keylen)