All method should return an array, not an object

This commit is contained in:
Toby Zerner 2015-05-02 08:47:10 +09:30
parent 2d30c8f010
commit 716e94c776

View File

@ -51,7 +51,8 @@ export default class Store {
} }
all(type) { all(type) {
return this.data[type] || {}; var data = this.data[type];
return data ? Object.keys(data).map(id => data[id]) : [];
} }
model(type, Model) { model(type, Model) {