fix: dont setimmediate when its not needed

This commit is contained in:
Jacob Heun 2018-11-01 14:58:17 +01:00 committed by David Dias
parent 87e8f1c86f
commit 9e5778694c

View File

@ -10,9 +10,7 @@ exports.create = function (hash, secret, callback) {
hmac.update(data)
setImmediate(() => {
cb(null, hmac.digest())
})
cb(null, hmac.digest())
},
length: lengths[hash]
}