Closes #769
This commit is contained in:
@ -297,7 +297,7 @@ Collection.prototype.removeDocument = async function(
|
|||||||
if (options.deleteDocument) {
|
if (options.deleteDocument) {
|
||||||
const childDocument = await Document.findById(id);
|
const childDocument = await Document.findById(id);
|
||||||
// Delete the actual document
|
// Delete the actual document
|
||||||
await childDocument.destroy();
|
if (childDocument) await childDocument.destroy();
|
||||||
// Delete all child documents
|
// Delete all child documents
|
||||||
await deleteChildren(id);
|
await deleteChildren(id);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user