Skip to content

Commit 2a2de40

Browse files
committed
controllers/dashboard: Replace deprecated store.pushMany() calls
1 parent 12edd6f commit 2a2de40

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/controllers/dashboard.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ export default Ember.Controller.extend({
3838
var page = (this.get('myFeed').length / 10) + 1;
3939

4040
ajax('/me/updates?page=' + page).then((data) => {
41-
this.store.pushMany('crate', data.crates);
42-
var versions = this.store.pushMany('version', data.versions);
41+
data.crates.forEach(crate =>
42+
this.store.push(this.store.normalize('crate', crate)));
43+
44+
var versions = data.versions.map(version =>
45+
this.store.push(this.store.normalize('version', version)));
46+
4347
this.get('myFeed').pushObjects(versions);
4448
this.set('hasMore', data.meta.more);
4549
}).finally(() => {

0 commit comments

Comments
 (0)