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: show error when opening nonexistent attached note
thecodrra773ab7e0a67
diff --git a/apps/web/src/components/attachment/index.js b/apps/web/src/components/attachment/index.jsindex aacc70f0a..befe73b35 100644--- a/apps/web/src/components/attachment/index.js+++ b/apps/web/src/components/attachment/index.js@@ -13,6 +13,7 @@ import {showPromptDialog,} from "../../common/dialog-controller";import { hashNavigate } from "../../navigation";+import { showToast } from "../../utils/toast";const workStatusMap = {recheck: "Rechecking...",@@ -145,7 +146,12 @@ const menuItems = [items: ({ attachment }) =>attachment.noteIds.reduce((prev, curr) => {const note = db.notes.note(curr);- if (!note) prev.push({ key: curr, title: `Note with id ${curr}` });+ if (!note)+ prev.push({+ key: curr,+ title: `Note with id ${curr}`,+ onClick: () => showToast("error", "This note does not exist."),+ });elseprev.push({key: note.id,