fix disappearing expander in some cases, closes #562

This commit is contained in:
zadam 2019-06-07 22:37:10 +02:00
parent f3ed7e936d
commit d3ac7b0939

View file

@ -746,19 +746,11 @@ async function createNoteInto() {
}
async function checkFolderStatus(node) {
const children = node.getChildren();
const note = await treeCache.getNote(node.data.noteId);
if (!children || children.length === 0) {
node.folder = false;
node.folder = note.type === 'search' || note.getChildNoteIds().length > 0;
node.icon = await treeBuilder.getIcon(note);
node.renderTitle();
}
else if (children && children.length > 0) {
node.folder = true;
node.icon = await treeBuilder.getIcon(note);
node.renderTitle();
}
}
async function reloadNote(noteId) {