diff --git a/frontend/scenes/Document/Document.js b/frontend/scenes/Document/Document.js index 77e14a780..c8b0631d8 100644 --- a/frontend/scenes/Document/Document.js +++ b/frontend/scenes/Document/Document.js @@ -117,11 +117,7 @@ type Props = { /> : Edit} -
+ ); diff --git a/frontend/scenes/Document/components/Menu.js b/frontend/scenes/Document/components/Menu.js index 6d050aa49..6e044b59b 100644 --- a/frontend/scenes/Document/components/Menu.js +++ b/frontend/scenes/Document/components/Menu.js @@ -11,7 +11,6 @@ import DocumentStore from '../DocumentStore'; type Props = { history: Object, document: DocumentType, - collectionTree: ?Object, store: DocumentStore, }; @@ -19,8 +18,9 @@ type Props = { props: Props; onCreateDocument = () => { - invariant(this.props.collectionTree, 'collectionTree is not available'); - this.props.history.push(`${this.props.collectionTree.url}/new`); + // Disabled until created a better API + // invariant(this.props.collectionTree, 'collectionTree is not available'); + // this.props.history.push(`${this.props.collectionTree.url}/new`); }; onCreateChild = () => { @@ -57,7 +57,6 @@ type Props = { const document = get(this.props, 'document'); if (document) { const collection = document.collection; - debugger; const allowDelete = collection && collection.type === 'atlas' && @@ -77,9 +76,8 @@ type Props = { {allowDelete && } ); - } else { - return ; } + return null; } } diff --git a/server/presenters.js b/server/presenters.js index 10dc20807..75d0b0e75 100644 --- a/server/presenters.js +++ b/server/presenters.js @@ -47,7 +47,7 @@ export async function presentDocument(ctx, document, options) { id: document.atlasId, }, })); - return await presentCollection(ctx, collection); + return presentCollection(ctx, collection); }); }