mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
protection against deleting root note
This commit is contained in:
@@ -59,6 +59,8 @@ async function moveToNode(nodesToMove, toNode) {
|
||||
}
|
||||
|
||||
async function deleteNodes(nodes) {
|
||||
nodes = nodes.filter(node => node.data.noteId !== 'root');
|
||||
|
||||
if (nodes.length === 0 || !confirm('Are you sure you want to delete select note(s) and all the sub-notes?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user