Skip to content

Commit 77810e2

Browse files
locksTurbo87
authored andcommitted
Fixes #1099 - "pushObjects is not a function"
1 parent 9760011 commit 77810e2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/controllers/dashboard.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Controller from '@ember/controller';
2+
import { A } from '@ember/array';
23
import { computed } from '@ember/object';
34
import { inject as service } from '@ember/service';
45

@@ -14,9 +15,9 @@ export default Controller.extend({
1415
this.fetchingFeed = true;
1516
this.loadingMore = false;
1617
this.hasMore = false;
17-
this.myCrates = [];
18-
this.myFollowing = [];
19-
this.myFeed = [];
18+
this.myCrates = A();
19+
this.myFollowing = A();
20+
this.myFeed = A();
2021
this.myStats = 0;
2122
},
2223

app/routes/dashboard.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Route from '@ember/routing/route';
2+
import { A } from '@ember/array';
23
import RSVP from 'rsvp';
34

45
import AuthenticatedRoute from '../mixins/authenticated-route';
@@ -15,7 +16,7 @@ export default Route.extend(AuthenticatedRoute, {
1516
controller.set('myStats', this.get('data.myStats'));
1617

1718
if (!controller.get('loadingMore')) {
18-
controller.set('myFeed', []);
19+
controller.set('myFeed', A());
1920
controller.send('loadMore');
2021
}
2122
},

0 commit comments

Comments
 (0)