mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
note expansion fix
This commit is contained in:
parent
3610926804
commit
14787e0283
@ -95,6 +95,11 @@ const noteTree = (function() {
|
|||||||
|
|
||||||
function prepareNoteTreeInner(parentNoteId) {
|
function prepareNoteTreeInner(parentNoteId) {
|
||||||
const childNoteIds = parentToChildren[parentNoteId];
|
const childNoteIds = parentToChildren[parentNoteId];
|
||||||
|
if (!childNoteIds) {
|
||||||
|
console.log("No children for " + noteId + ". This shouldn't happen.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const noteList = [];
|
const noteList = [];
|
||||||
|
|
||||||
for (const childNoteId of childNoteIds) {
|
for (const childNoteId of childNoteIds) {
|
||||||
@ -327,14 +332,8 @@ const noteTree = (function() {
|
|||||||
},
|
},
|
||||||
lazyLoad: function(event, data){
|
lazyLoad: function(event, data){
|
||||||
const node = data.node.data;
|
const node = data.node.data;
|
||||||
const noteTreeId = node.note_tree_id;
|
|
||||||
|
|
||||||
if (parentToChildren[noteTreeId]) {
|
data.result = prepareNoteTreeInner(node.note_id);
|
||||||
data.result = prepareNoteTreeInner(parentToChildren[noteTreeId]);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("No children for " + noteTreeId + ". This shouldn't happen.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user