From 5a79879e63aecaac25030e42ac414ac5a0faee65 Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Thu, 7 Aug 2014 20:39:20 -0700 Subject: [PATCH] use process.browser only, which is sufficient --- lib/random.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/random.js b/lib/random.js index eb34636..4947e7c 100644 --- a/lib/random.js +++ b/lib/random.js @@ -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);