From b3090c6352a86053aaa0b3ffbe4d14f3461588af Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 29 Jul 2016 13:05:42 -0300 Subject: [PATCH] no result fix --- lib/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage.js b/lib/storage.js index 45b3f2f..2f7cc06 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -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);