From 8c90f6f346c04f1174c3eeaddf110171f90f9a09 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 16 Dec 2015 16:40:02 -0300 Subject: [PATCH] Check if array is empty --- src/js/services/txFormatService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/services/txFormatService.js b/src/js/services/txFormatService.js index 8a78249f5..1061ede76 100644 --- a/src/js/services/txFormatService.js +++ b/src/js/services/txFormatService.js @@ -24,7 +24,7 @@ angular.module('copayApp.services').factory('txFormatService', function(profileS root.processTx = function(tx) { if (!tx) return; - if (lodash.isArray(tx.outputs) && tx.action != 'received') { + if (lodash.isArray(tx.outputs) && tx.outputs.length > 0 && tx.action != 'received') { tx.hasMultiplesOutputs = true; tx.recipientCount = tx.outputs.length; tx.amount = lodash.reduce(tx.outputs, function(total, o) {