Skip to content

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

fix: note can not be uncolored

thecodrr9702084be67d
diff --git a/apps/web/src/stores/note-store.js b/apps/web/src/stores/note-store.js
index 482f19993..d09b21ffc 100644
--- a/apps/web/src/stores/note-store.js
+++ b/apps/web/src/stores/note-store.js
@@ -112,8 +112,8 @@ class NoteStore extends BaseStore {
setColor = async (id, color) => {
let note = db.notes.note(id);
if (!note) return;
- const shouldUncolor = note.data.color === color;
- if (!shouldUncolor) await db.notes.note(id).color(color);
+ if (note.data.color === color) await db.notes.note(id).uncolor();
+ else await db.notes.note(id).color(color);
appStore.refreshColors();
if (!this._syncEditor(note.id, "color", db.notes.note(id).data.color)) {
this.refresh();