Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: always keep one tab open

Abdullah Attac3d244b3b6c4
diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.ts
index 3735969a8..6564062e4 100644
--- a/apps/web/src/stores/editor-store.ts
+++ b/apps/web/src/stores/editor-store.ts
@@ -809,8 +809,9 @@ class EditorStore extends BaseStore<EditorStore> {
state.sessions = sessions;
});
- const { history } = this.get();
+ const { history, sessions } = this.get();
this.activateSession(history.pop());
+ if (sessions.length === 0) this.newSession();
};
setTitle = (id: string, title: string) => {