Skip to content

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

fix: crash when saving session

thecodrr5b6a502f1b3a
diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js
index da481ed7a..882b32cff 100644
--- a/apps/web/src/stores/editor-store.js
+++ b/apps/web/src/stores/editor-store.js
@@ -1,5 +1,5 @@
import createStore from "../common/store";
-import { store as noteStore, LIST_TYPES } from "./note-store";
+import { store as noteStore } from "./note-store";
import { store as appStore } from "./app-store";
import { store as tagStore } from "./tag-store";
import { db } from "../common";
@@ -137,7 +137,7 @@ function editorStore(set, get) {
// we update favorites only if favorite has changed
if (!oldSession || oldSession.favorite !== session.favorite) {
- notesState.refreshList(LIST_TYPES.fav);
+ notesState.setSelectedContext({ type: "favorites" });
}
});
},
diff --git a/apps/web/src/stores/note-store.js b/apps/web/src/stores/note-store.js
index 6ef6d470e..c3282f942 100644
--- a/apps/web/src/stores/note-store.js
+++ b/apps/web/src/stores/note-store.js
@@ -4,10 +4,6 @@ import { store as editorStore } from "./editor-store";
import { store as appStore } from "./app-store";
import { showPasswordDialog } from "../components/dialogs/passworddialog";
-const LIST_TYPES = {
- fav: "favorites"
-};
-
function noteStore(set, get) {
return {
notes: {
@@ -144,4 +140,4 @@ function setValue(set, noteId, prop, value) {
const [useStore, store] = createStore(noteStore);
-export { useStore, store, LIST_TYPES };
+export { useStore, store };