protection against deleting root note

This commit is contained in:
azivner
2018-08-30 22:38:34 +02:00
parent 0442a44aab
commit ce9805c5bc
3 changed files with 7 additions and 1 deletions

View File

@@ -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;
}