Merge branch 'master' into share-links

This commit is contained in:
Tom Moor
2018-05-22 21:27:45 -07:00
9 changed files with 76 additions and 42 deletions

View File

@ -428,7 +428,7 @@ router.post('documents.delete', auth(), async ctx => {
authorize(ctx.state.user, 'delete', document);
const collection = document.collection;
if (collection.type === 'atlas') {
if (collection && collection.type === 'atlas') {
// Delete document and all of its children
await collection.removeDocument(document);
}