bugfix: omission of `crypto = global.crypto`

This commit is contained in:
Michael Mclaughlin 2015-12-10 19:47:18 +00:00
parent 003231086e
commit b5285dda35
1 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,8 @@
*/
var BigNumber, crypto, parseNumeric,
var BigNumber, parseNumeric,
crypto = global.crypto,
isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,
mathceil = Math.ceil,
mathfloor = Math.floor,
@ -2684,7 +2685,7 @@
// Node and other environments that support module.exports.
} else if ( typeof module != 'undefined' && module.exports ) {
module.exports = BigNumber;
try { crypto = require('cry' + 'pto'); } catch (e) {}
if ( !crypto ) try { crypto = require('cry' + 'pto'); } catch (e) {}
// Browser.
} else {