mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
soft-deleting note will delete its content and all the revisions content, fixes #132
This commit is contained in:
@@ -223,8 +223,14 @@ async function deleteNote(branch) {
|
||||
|
||||
if (notDeletedBranches.length === 0) {
|
||||
note.isDeleted = true;
|
||||
note.content = '';
|
||||
await note.save();
|
||||
|
||||
for (const noteRevision of await note.getRevisions()) {
|
||||
noteRevision.content = '';
|
||||
await noteRevision.save();
|
||||
}
|
||||
|
||||
for (const childBranch of await note.getChildBranches()) {
|
||||
await deleteNote(childBranch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user