From d26a0fae175d1abf6d24fdab5ca03d4c257f57ae Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 31 May 2023 00:03:20 +0200 Subject: [PATCH] if a note context has sub contexts, then it has to be saved even if empty, fixes #3985 --- src/public/app/components/note_context.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/public/app/components/note_context.js b/src/public/app/components/note_context.js index 3df6b206e..c22a87ac6 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 {