mirror of
https://github.com/zadam/trilium.git
synced 2026-01-01 04:04:25 +01:00
Address Gemini's comment
This commit is contained in:
parent
7c7797d35a
commit
cb016c4307
@ -16,8 +16,13 @@
|
||||
// should go to the end of the previous tree
|
||||
let candidate = children[index - 1];
|
||||
while (candidate?.hasVisibleChildren()) {
|
||||
const children = candidate.getVisibleChildNotes();
|
||||
candidate = children[children.length - 1];
|
||||
const visibleChildren = candidate.getVisibleChildNotes();
|
||||
|
||||
if (visibleChildren.length === 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
candidate = visibleChildren[visibleChildren.length - 1];
|
||||
}
|
||||
|
||||
return candidate ?? null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user