Skip to content

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

fix: close note when it gets locked

thecodrr3f8e88c4cff0
diff --git a/apps/web/src/stores/note-store.js b/apps/web/src/stores/note-store.js
index 6169339b1..7f7352a8d 100644
--- a/apps/web/src/stores/note-store.js
+++ b/apps/web/src/stores/note-store.js
@@ -111,11 +111,9 @@ class NoteStore extends BaseStore {
};
lock = async (id) => {
- await Vault.lockNote(id).then(async () => {
- if (editorStore.get().session.id === id)
- await editorStore.openSession(id);
- this.refresh();
- });
+ await Vault.lockNote(id);
+ if (editorStore.get().session.id === id) editorStore.clearSession(true);
+ this.refresh();
};
setColor = async (id, color) => {