fix preferences history

This commit is contained in:
Gabriel Bazán 2016-09-02 12:22:31 -03:00
parent 0a5efb4930
commit 9e810466b7
1 changed files with 3 additions and 3 deletions

View File

@ -28,12 +28,12 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
$log.debug('Generating CSV from History');
getHistory(function(err, txs) {
if (err || !txs) {
$log.warn('Failed to generate CSV:', err);
if (err || lodash.isEmpty(txs)) {
if (err) $log.warn('Failed to generate CSV:', err);
else $log.warn('Failed to generate CSV: no transactions');
if (cb) return cb(err);
return;
}
$log.debug('Wallet Transaction History Length:', txs.length);
$scope.satToUnit = 1 / $scope.unitToSatoshi;