From fb82137ecefb56b5e93b70686e0dc0b4bb591b7c Mon Sep 17 00:00:00 2001 From: "Calvin W. Metcalf" Date: Thu, 8 Apr 2021 14:35:43 -0400 Subject: [PATCH] handle different returns --- lib/async.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)