fix reopening the very last tab, closes #3397

This commit is contained in:
zadam
2022-12-10 14:35:58 +01:00
parent c44bc60667
commit 494f8d2153
2 changed files with 36 additions and 26 deletions

View File

@@ -32,6 +32,10 @@ class NoteContext extends Component {
});
}
isEmpty() {
return !this.noteId;
}
async setNote(inputNotePath, triggerSwitchEvent = true) {
const resolvedNotePath = await this.getResolvedNotePath(inputNotePath);
@@ -59,8 +63,6 @@ class NoteContext extends Component {
});
}
console.log(resolvedNotePath, "resolvedNotePath");
if (this.hoistedNoteId === 'root' && this.notePath.startsWith("root/hidden")) {
// hidden subtree displays only when hoisted so it doesn't make sense to keep root as hoisted note