mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 12:41:45 +02:00
fix: note not opening properly
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user