From 77810e2e9540f63e6abc542ad63cf4d501897ddb Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Mon, 2 Oct 2017 12:06:45 +0100 Subject: [PATCH] Fixes #1099 - "pushObjects is not a function" --- app/controllers/dashboard.js | 7 ++++--- app/routes/dashboard.js | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/dashboard.js b/app/controllers/dashboard.js index dc70935e2b9..7557d17d8fa 100644 --- a/app/controllers/dashboard.js +++ b/app/controllers/dashboard.js @@ -1,4 +1,5 @@ import Controller from '@ember/controller'; +import { A } from '@ember/array'; import { computed } from '@ember/object'; import { inject as service } from '@ember/service'; @@ -14,9 +15,9 @@ export default Controller.extend({ this.fetchingFeed = true; this.loadingMore = false; this.hasMore = false; - this.myCrates = []; - this.myFollowing = []; - this.myFeed = []; + this.myCrates = A(); + this.myFollowing = A(); + this.myFeed = A(); this.myStats = 0; }, diff --git a/app/routes/dashboard.js b/app/routes/dashboard.js index efa37405f1b..c75ca5d6383 100644 --- a/app/routes/dashboard.js +++ b/app/routes/dashboard.js @@ -1,4 +1,5 @@ import Route from '@ember/routing/route'; +import { A } from '@ember/array'; import RSVP from 'rsvp'; import AuthenticatedRoute from '../mixins/authenticated-route'; @@ -15,7 +16,7 @@ export default Route.extend(AuthenticatedRoute, { controller.set('myStats', this.get('data.myStats')); if (!controller.get('loadingMore')) { - controller.set('myFeed', []); + controller.set('myFeed', A()); controller.send('loadMore'); } },