1
0
mirror of https://github.com/flarum/core.git synced 2025-06-28 05:34:19 +02:00

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 58833b9fdb
commit 3ff0b806a4

View File

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