Skip to content

Commit 99609d2

Browse files
committed
switch to range error
1 parent 8a39ce0 commit 99609d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (crypto && crypto.getRandomValues) {
2323

2424
function randomBytes (size, cb) {
2525
// phantomjs needs to throw
26-
if (size > MAX_UINT32) throw new Error('requested too many random bytes')
26+
if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')
2727

2828
var bytes = Buffer.allocUnsafe(size)
2929

0 commit comments

Comments
 (0)