summaryrefslogtreecommitdiff
path: root/js/controller
diff options
context:
space:
mode:
Diffstat (limited to 'js/controller')
-rw-r--r--js/controller/packages.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/js/controller/packages.js b/js/controller/packages.js
index 3a7858d..db94d72 100644
--- a/js/controller/packages.js
+++ b/js/controller/packages.js
@@ -20,7 +20,6 @@
function controller() {
var self = this;
- this.packages = packages.Packages();
this.pages = m.prop([]);
this.currentPageIndex = 0;
this.pageSize = 20;
@@ -47,10 +46,12 @@
this.phase = m.prop(packages.PHASE_NONE);
this.selectedPackage = m.prop(null);
- // All packages are visible initially
- this.packages.then(function(packages) {
- self.pages(self.paginate(packages, self.pageSize));
- });
+ this.packages = packages.Packages()
+ .then(function(packages) {
+ // All packages are visible initially
+ self.pages(self.paginate(packages, self.pageSize));
+ })
+ .then(m.redraw);
};