diff --git a/app/routes/index.js b/app/routes/index.js index d77473f..d1d5bb0 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -34,6 +34,14 @@ export default Route.extend({ return items; }); + }, + + setupController(controller, model) { + this._super(controller, model); + + if (isEmpty(this.get('storage.categories')) && this.get('storage.connected')) { + this.get('storage').fetchCategories(); + } } });