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

@ -2677,19 +2677,20 @@
// EXPORT
// AMD.
// AMD.
if ( typeof define == 'function' && define.amd ) {
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 ) {
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.
} else if (globalObj) {
globalObj.BigNumber = constructorFactory();
} else {
BigNumber = constructorFactory();
if ( !globalObj ) globalObj = typeof self != 'undefined' ? self : Function('return this')();
globalObj.BigNumber = constructorFactory();
}
})(this);