Skip to content

Build your personal knowledge base with Trilium Notes

if a note context has sub contexts, then it has to be saved even if empty, fixes #3985

zadamd26a0fae175d
diff --git a/src/public/app/components/note_context.js b/src/public/app/components/note_context.js
index 3df6b206e9..c22a87ac60 100644
--- a/src/public/app/components/note_context.js
+++ b/src/public/app/components/note_context.js
@@ -176,9 +176,12 @@ class NoteContext extends Component {
}
getTabState() {
- if (!this.notePath && this.hoistedNoteId === 'root') {
+ if (this.hoistedNoteId !== 'root') {
// keeping empty hoisted tab is esp. important for mobile (e.g. opened launcher config)
- return null;
+
+ if (!this.notePath && this.getSubContexts().length === 0) {
+ return null;
+ }
}
return {