Fixed collection creation

This commit is contained in:
Jori Lallo
2017-05-29 20:00:08 -07:00
parent 0d87d6abf5
commit 9a2caeb5ff

View File

@@ -30,15 +30,7 @@ class CollectionsStore {
invariant(res && res.data, 'Collection list not available');
const { data } = res;
runInAction('CollectionsStore#fetch', () => {
this.data.replace(
data.map(
collection =>
new Collection({
...collection,
errors: this.errors,
})
)
);
this.data.replace(data.map(collection => new Collection(collection)));
this.isLoaded = true;
});
} catch (e) {