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: delete undo causing a crash
thecodrrbe8fca67c27f
diff --git a/apps/web/src/common/toasts.js b/apps/web/src/common/toasts.jsindex b689160b3..0b263ba2b 100644--- a/apps/web/src/common/toasts.js+++ b/apps/web/src/common/toasts.js@@ -47,9 +47,11 @@ function showItemDeletedToast(item) {const messageText = `${noun} deleted successfully!`;const undoAction = async () => {toast.hide();- let trashItem = db.trash.all.find((i) => i.itemId === item.id);+ let trashItem = db.trash.all.find((i) => i.id === item.id);+ if (!trashItem) return;await db.trash.restore(trashItem.id);nbstore.refresh();+ notestore.refresh();};let actions = [{ text: "Undo", onClick: undoAction }];var toast = showToast("success", messageText, actions);