summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/TimelineCtrl.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js
index 7f100ff5..048fc03e 100644
--- a/www/js/TimelineCtrl.js
+++ b/www/js/TimelineCtrl.js
@@ -466,7 +466,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla
// I figure out how many items the server returns per API page
// and divide the # of items I want (currently 200) with # of items per page
// So iterCount is the # of HTTP calls I need to make
- iterCount = Math.round(count / itemsPerPage);
+ iterCount = Math.max(Math.round(count / itemsPerPage),1);
ZMDataModel.zmDebug("TimelineCtrl/drawGraph: pages of data: " + pages + " items per page: " + itemsPerPage);
ZMDataModel.zmDebug("TimelineCtrl/drawGraph: I will make " + iterCount + " HTTP Requests to get all graph data");