Resilient to collection or document not existing

This commit is contained in:
Tom Moor
2017-07-23 15:26:00 -07:00
parent 2ac115d681
commit e6938ee06f
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ async function present(ctx: Object, document: Document, options: ?Options) {
views: undefined,
};
if (document.private) {
if (document.private && document.collection) {
data.collection = await presentCollection(ctx, document.collection);
}