We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94b415b commit 7968c79Copy full SHA for 7968c79
lib/internal/crypto/random.js
@@ -102,7 +102,7 @@ function randomBytes(size, callback) {
102
103
// Keep the callback as a regular function so this is propagated.
104
randomFill(buf.buffer, 0, size, function(error) {
105
- if (error) FunctionPrototypeCall(callback, this, error);
+ if (error) return FunctionPrototypeCall(callback, this, error);
106
FunctionPrototypeCall(callback, this, null, buf);
107
});
108
}
0 commit comments