use process.browser only, which is sufficient
This commit is contained in:
parent
383fb03422
commit
5a79879e63
|
@ -3,7 +3,7 @@ function Random() {
|
|||
|
||||
/* secure random bytes that sometimes throws an error due to lack of entropy */
|
||||
Random.getRandomBuffer = function(size) {
|
||||
if (typeof process === 'undefined' || process.browser)
|
||||
if (process.browser)
|
||||
return Random.getRandomBufferBrowser(size);
|
||||
else
|
||||
return Random.getRandomBufferNode(size);
|
||||
|
|
Loading…
Reference in New Issue