summaryrefslogtreecommitdiff
path: root/js/controller
diff options
context:
space:
mode:
Diffstat (limited to 'js/controller')
-rw-r--r--js/controller/packages.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/controller/packages.js b/js/controller/packages.js
index 89f01e9..d9e0839 100644
--- a/js/controller/packages.js
+++ b/js/controller/packages.js
@@ -61,9 +61,10 @@
};
controller.prototype.packageCount = function() {
- return this.pager().pages.reduce(function(memo, page) {
- return memo + page.length;
- }, 0);
+ return _.chain(this.pager().pages)
+ .pluck('length')
+ .reduce(guix.add, 0)
+ .value();
};
controller.prototype.doSearch = function() {