From 671ef9a5bb0b79e8fa7ffb10b6e0c8365a6f5f3b Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Mon, 13 Jul 2015 17:18:07 -0300 Subject: [PATCH] rm start/end 2 --- app/controllers/addresses.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/addresses.js b/app/controllers/addresses.js index 9e03a93..b217edb 100644 --- a/app/controllers/addresses.js +++ b/app/controllers/addresses.js @@ -138,7 +138,9 @@ exports.multitxs = function(req, res, next) { to = from + MAX_BATCH_SIZE; if (from < 0) from = 0; - if (to > nbTxs) tx = nbTxs; + if (to < 0) to = 0; + if (from > nbTxs) from = nbTxs; + if (to > nbTxs) to = nbTxs; txs.sort(function(a, b) { return (b.ts || b.ts) - (a.ts || a.ts);