Skip to content

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

fix: last note not opening

thecodrr697f18b9d79c
diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js
index 3fc6f26a4..be111883f 100644
--- a/apps/web/src/stores/editor-store.js
+++ b/apps/web/src/stores/editor-store.js
@@ -43,13 +43,15 @@ class EditorStore extends BaseStore {
});
};
- openLastSession = async () => {
+ openLastSession = () => {
// Do not reopen last session on mobile
if (isMobile() && isTablet()) return;
const id = localStorage.getItem("lastOpenedNote");
if (id) {
- setHashParam({ note: id });
+ db.notes.init().then(() => {
+ setHashParam({ note: id });
+ });
}
};