ecpair/hdnode: fix network variable shadowing

This commit is contained in:
Daniel Cousens 2017-01-06 13:41:51 +11:00 committed by Daniel Cousens
parent c852372559
commit 91ff39d95a
2 changed files with 7 additions and 7 deletions

View file

@ -61,9 +61,9 @@ HDNode.fromBase58 = function (string, networks) {
// list of networks?
if (Array.isArray(networks)) {
network = networks.filter(function (network) {
return version === network.bip32.private ||
version === network.bip32.public
network = networks.filter(function (x) {
return version === x.bip32.private ||
version === x.bip32.public
}).pop()
if (!network) throw new Error('Unknown network version')