Resilient to collection or document not existing
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user