use process.browser only, which is sufficient

This commit is contained in:
Ryan X. Charles 2014-08-07 20:39:20 -07:00
parent 383fb03422
commit 5a79879e63
1 changed files with 1 additions and 1 deletions

View File

@ -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);