diff --git a/src/public/app/services/note_context.js b/src/public/app/services/note_context.js index 95d814086..ee02c0d77 100644 --- a/src/public/app/services/note_context.js +++ b/src/public/app/services/note_context.js @@ -21,6 +21,10 @@ class NoteContext extends Component { } setEmpty() { + this.notePath = null; + this.noteId = null; + this.parentNoteId = null; + this.triggerEvent('noteSwitched', { noteContext: this, notePath: this.notePath diff --git a/src/public/app/services/tab_manager.js b/src/public/app/services/tab_manager.js index d14107ad2..065a29556 100644 --- a/src/public/app/services/tab_manager.js +++ b/src/public/app/services/tab_manager.js @@ -305,6 +305,7 @@ export default class TabManager extends Component { const mainNoteContexts = this.getNoteContexts().filter(nc => nc.isMainContext()); if (mainNoteContexts.length === 1) { + mainNoteContexts[0].setEmpty(); return; } }