Skip to content

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

fix: note note being creating in color or tag

thecodrr9725fe513c51
diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js
index d5954eef5..a805a1309 100644
--- a/apps/web/src/stores/editor-store.js
+++ b/apps/web/src/stores/editor-store.js
@@ -106,14 +106,14 @@ class EditorStore extends BaseStore {
this._saveFn()(this.get().session).then(async (id) => {
/* eslint-disable */
- storeSync: if (oldSession) {
- if (oldSession.tags.length !== this.get().session.tags.length)
+ storeSync: {
+ const session = this.get().session;
+ if (oldSession?.tags?.length !== session.tags.length)
tagStore.refresh();
- if (oldSession.color !== this.get().session.color)
- appStore.refreshColors();
+ if (oldSession?.color !== session.color) appStore.refreshColors();
- if (!oldSession.context) break storeSync;
+ if (!oldSession?.context) break storeSync;
const { type, value } = oldSession.context;
if (type === "topic") await db.notes.move(value, id);
@@ -127,9 +127,12 @@ class EditorStore extends BaseStore {
}
this.set((state) => {
+ const note = db.notes.note(id).data;
state.session.id = id;
- state.session.title = db.notes.note(id).title;
+ state.session.title = note.title;
state.session.isSaving = false;
+ state.session.color = note.color;
+ state.session.tags = note.tags;
});
noteStore.refresh();
diff --git a/apps/web/yarn.lock b/apps/web/yarn.lock
index ce71031cb..c316c703d 100644
--- a/apps/web/yarn.lock
+++ b/apps/web/yarn.lock
@@ -8975,7 +8975,7 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
"notes-core@git+ssh://[email protected]:streetwriters/notesnook-core.git":
version "5.2.0"
- resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#0cc20661d742576c61b26204a5e8f74aac9c87e4"
+ resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#aa6b60d1988e5248aa1c2902c070b3a41bb456eb"
dependencies:
fast-sort "^2.0.1"
fuzzysearch "^1.0.3"