From 519ff24f4e741f1ca8d0ac086e7ea128bb5b4c68 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sun, 3 Jan 2021 11:48:37 +0500 Subject: [PATCH] fix: note not opening properly --- apps/web/src/stores/editor-store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);