Merge pull request #1322 from ryanxcharles/fix-web-workers

fix web worker issues
This commit is contained in:
Braydon Fuller 2015-08-24 16:47:00 -04:00
commit d7cd12b9d6
3 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ Hash.ripemd160 = function(buf) {
// Node.js crypto ripemd160 hashes are not supported in a browser // Node.js crypto ripemd160 hashes are not supported in a browser
// We'll replace with a (slower) version that does. // We'll replace with a (slower) version that does.
if (global.window) { if (process.browser) {
Hash.ripemd160 = function(buf) { Hash.ripemd160 = function(buf) {
$.checkArgument(BufferUtil.isBuffer(buf)); $.checkArgument(BufferUtil.isBuffer(buf));
var hash = (new hashjs.ripemd160()).update(buf).digest(); var hash = (new hashjs.ripemd160()).update(buf).digest();

6
npm-shrinkwrap.json generated
View File

@ -35,9 +35,9 @@
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
}, },
"lodash": { "lodash": {
"version": "2.4.1", "version": "3.10.1",
"from": "lodash@=2.4.1", "from": "lodash@=3.10.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.1.tgz" "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz"
}, },
"sha512": { "sha512": {
"version": "0.0.1", "version": "0.0.1",

View File

@ -84,7 +84,7 @@
"elliptic": "=3.0.3", "elliptic": "=3.0.3",
"hash.js": "=1.0.2", "hash.js": "=1.0.2",
"inherits": "=2.0.1", "inherits": "=2.0.1",
"lodash": "=2.4.1", "lodash": "=3.10.1",
"sha512": "=0.0.1" "sha512": "=0.0.1"
}, },
"devDependencies": { "devDependencies": {