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
web: handle errors in attachment manager
Abdullah Atta2576f1dd0073
diff --git a/apps/web/src/dialogs/attachments-dialog.tsx b/apps/web/src/dialogs/attachments-dialog.tsxindex 86e65d4ac..b40ffa3ba 100644--- a/apps/web/src/dialogs/attachments-dialog.tsx+++ b/apps/web/src/dialogs/attachments-dialog.tsx@@ -197,14 +197,15 @@ export const AttachmentsDialog = DialogManager.register(variant="secondary"key={tool.title}title={tool.title}- onClick={() =>- tool.onClick({- selected- // : attachments.filter(- // (a) => selected.indexOf(a.id) > -1- // )- })- }+ onClick={() => {+ try {+ tool.onClick({+ selected+ });+ } catch (e) {+ showToast("error", (e as Error).message);+ }+ }}disabled={!selected.length}sx={{ bg: "transparent", p: 1 }}>