no result fix

This commit is contained in:
Matias Alejo Garcia 2016-07-29 13:05:42 -03:00
parent bb08cba966
commit b3090c6352
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ Storage.prototype.getTxHistoryCache = function(walletId, from, to, cb) {
}, function(err, result) {
if (err) return cb(err);
if (result.history.length < end)
if (!result || result.history.length < end)
return cb();
var ret = result.history.slice(fwdIndex, end);