Fixes undefined check

This commit is contained in:
Felipe Lima 2014-08-26 11:25:50 -03:00
parent ba9ff424c2
commit 693f2aac7b

View File

@ -634,7 +634,7 @@ Transaction.prototype.getReceivingAddresses = function(networkName) {
for (var i = 0; i<this.outs.length; i++) {
var o = this.outs[i];
var tmp = Address.fromScriptPubKey(o.getScript(), networkName);
if (typeof tmp !== 'undefined') {
if (typeof tmp[0] !== 'undefined') {
var addr = tmp[0].toString();
ret.push(addr);
} else {