A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: catch error when setting color
thecodrr29703646bb6e
diff --git a/apps/web/src/stores/note-store.js b/apps/web/src/stores/note-store.jsindex aa440afba..8dd41548b 100644--- a/apps/web/src/stores/note-store.js+++ b/apps/web/src/stores/note-store.js@@ -110,13 +110,17 @@ class NoteStore extends BaseStore {};setColor = async (id, color) => {- let note = db.notes.note(id);- if (!note) return;- 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();+ try {+ let note = db.notes.note(id);+ if (!note) return;+ 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();+ }+ } catch (e) {+ console.error(e);}};