mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
fixes for invalid operations on root note
This commit is contained in:
@@ -37,6 +37,11 @@ async function checkTreeCycles(errorList) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!childToParents[noteId] || childToParents[noteId].length === 0) {
|
||||
errorList.push(`No parents found for noteId=${noteId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
for (const parentNoteId of childToParents[noteId]) {
|
||||
if (path.includes(parentNoteId)) {
|
||||
errorList.push(`Tree cycle detected at parent-child relationship: ${parentNoteId} - ${noteId}, whole path: ${path}`);
|
||||
|
||||
Reference in New Issue
Block a user