Skip to content

Commit 9284566

Browse files
committed
if rng is not available, other features should still work
1 parent f2ab273 commit 9284566

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rng.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
(function() {
22
var g = ('undefined' === typeof window ? global : window) || {}
3-
var foolBrowserify = require
3+
var foolBrowserify = function (r) {
4+
try { return require(r) } catch (_) { }
5+
}
46
_crypto = (
57
g.crypto || g.msCrypto || foolBrowserify('crypto')
68
)

0 commit comments

Comments
 (0)