Correct UMD

This commit is contained in:
Michael Mclaughlin 2015-12-15 21:10:41 +00:00
parent 2b7d123180
commit ea4278907e
1 changed files with 7 additions and 6 deletions

View File

@ -2681,15 +2681,16 @@
if ( typeof define == 'function' && define.amd ) { if ( typeof define == 'function' && define.amd ) {
define( function () { return constructorFactory(); } ); define( function () { return constructorFactory(); } );
// Node and other environments that support module.exports. // Node.js and other environments that support module.exports.
} else if ( typeof module != 'undefined' && module.exports ) { } else if ( typeof module != 'undefined' && module.exports ) {
module.exports = constructorFactory(); module.exports = constructorFactory();
if ( !cryptoObj ) try { cryptoOj = require('cry' + 'pto'); } catch (e) {}
// Split string stops browserify adding crypto shim.
if ( !cryptoObj ) try { cryptoObj = require('cry' + 'pto'); } catch (e) {}
// Browser. // Browser.
} else if (globalObj) {
globalObj.BigNumber = constructorFactory();
} else { } else {
BigNumber = constructorFactory(); if ( !globalObj ) globalObj = typeof self != 'undefined' ? self : Function('return this')();
globalObj.BigNumber = constructorFactory();
} }
})(this); })(this);