Skip to content

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

fix: note not opening properly

thecodrr519ff24f4e74
diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js
index 67d57ecc4..6e4346484 100644
--- a/apps/web/src/stores/editor-store.js
+++ b/apps/web/src/stores/editor-store.js
@@ -55,14 +55,14 @@ class EditorStore extends BaseStore {
};
openSession = async (noteId) => {
+ await db.notes.init();
+
const session = this.get().session;
- console.log(session);
if (session.id === noteId && session.state === SESSION_STATES.unlocked) {
this.set((state) => (state.session.state = SESSION_STATES.new));
return;
}
- await db.notes.init();
let note = db.notes.note(noteId);
if (!note) return;
note = qclone(note.data);