Skip to content

Commit be8ebc8

Browse files
Merge #1100
1100: Fix "pushObjects is not a function" error r=carols10cents This is a bit of a quick patch to address the problem, we should dig some more into why it's happening. Fixes #1099 [edit] I only checked `config/environment.js` for something disabling prototype extensions, and forgot to check `package.json`, which lists [ember-disable-prototype-extensions](https://github.com/rust-lang/crates.io/blob/master/package.json#L49).
2 parents 9760011 + 77810e2 commit be8ebc8

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)