mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08:00
All method should return an array, not an object
This commit is contained in:
parent
2d30c8f010
commit
716e94c776
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user