Merge master

This commit is contained in:
Tom Moor
2017-10-21 21:12:56 -07:00
106 changed files with 1259 additions and 1044 deletions

View File

@@ -111,8 +111,12 @@ class DocumentsStore extends BaseStore {
return data.map(documentData => documentData.id);
};
@action fetch = async (id: string): Promise<*> => {
this.isFetching = true;
@action prefetchDocument = async (id: string) => {
if (!this.getById(id)) this.fetch(id, true);
};
@action fetch = async (id: string, prefetch?: boolean): Promise<*> => {
if (!prefetch) this.isFetching = true;
try {
const res = await client.post('/documents.info', { id });