This commit is contained in:
Jori Lallo
2017-10-21 19:29:14 -07:00
parent bd1cdb4a9f
commit 30bb7bcde5
2 changed files with 2 additions and 3 deletions

View File

@@ -133,13 +133,12 @@ type DocumentLinkProps = {
history: Object, history: Object,
activeDocument: ?Document, activeDocument: ?Document,
activeDocumentRef: HTMLElement => void, activeDocumentRef: HTMLElement => void,
prefetchDocument: string => void, prefetchDocument: (documentId: string) => void,
depth: number, depth: number,
}; };
const DocumentLink = observer( const DocumentLink = observer(
({ ({
documents,
document, document,
activeDocument, activeDocument,
activeDocumentRef, activeDocumentRef,

View File

@@ -250,6 +250,7 @@ class Document extends BaseModel {
if (dirty) this.hasPendingChanges = true; if (dirty) this.hasPendingChanges = true;
this.data = data; this.data = data;
extendObservable(this, data); extendObservable(this, data);
this.fetchedAt = new Date();
} }
constructor(data?: Object = {}) { constructor(data?: Object = {}) {
@@ -257,7 +258,6 @@ class Document extends BaseModel {
this.updateData(data); this.updateData(data);
this.errors = stores.errors; this.errors = stores.errors;
this.fetchedAt = new Date();
} }
} }