[Pkg-javascript-commits] [node-randomfill] 07/47: Fix crypto global detection
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:52:51 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-randomfill.
commit ecd13ce0845141015bae319c70754b2792946566
Author: Feross Aboukhadijeh <feross at feross.org>
Date: Wed Jan 21 14:51:36 2015 -0800
Fix crypto global detection
Recent changes to crypto-browserify make browserify tests fail. This
fixes them.
---
browser.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/browser.js b/browser.js
index 7ba1c5c..1a6e3e3 100644
--- a/browser.js
+++ b/browser.js
@@ -1,7 +1,7 @@
'use strict';
var crypto = global.crypto || global.msCrypto
-if(crypto.getRandomValues) {
+if(crypto && crypto.getRandomValues) {
module.exports = randomBytes;
} else {
module.exports = oldBrowser;
@@ -25,4 +25,4 @@ function oldBrowser() {
'secure random number generation not supported by this browser\n'+
'use chrome, FireFox or Internet Explorer 11'
)
-}
\ No newline at end of file
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-randomfill.git
More information about the Pkg-javascript-commits
mailing list