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: create error from ErrorEvent if none found
Abdullah Atta2d9f41e1143a
diff --git a/apps/web/src/hooks/use-database.ts b/apps/web/src/hooks/use-database.tsindex 892196fc0..5fa89ddbd 100644--- a/apps/web/src/hooks/use-database.ts+++ b/apps/web/src/hooks/use-database.ts@@ -41,7 +41,9 @@ export default function useDatabase(persistence: "db" | "memory" = "db") {.catch((e) => showBoundary(e));function handleError(e: ErrorEvent) {- showBoundary(e.error);+ const error = new Error(e.message);+ error.stack = `${e.filename}:${e.lineno}:${e.colno}`;+ showBoundary(e.error || error);}function handleUnhandledRejection(e: PromiseRejectionEvent) {showBoundary(e.reason);