Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: show error if export fails for some reason

thecodrr73a5f435b2d3
diff --git a/apps/web/src/common/export.ts b/apps/web/src/common/export.ts
index bc1d8b318..1268a5bb6 100644
--- a/apps/web/src/common/export.ts
+++ b/apps/web/src/common/export.ts
@@ -2,6 +2,7 @@ import { db } from "./db";
import { TaskManager } from "./task-manager";
import { zip } from "../utils/zip";
import { saveAs } from "file-saver";
+import { showToast } from "../utils/toast";
export async function exportToPDF(
title: string,
@@ -48,7 +49,9 @@ export async function exportNotes(
text: `Exporting "${note.title}"...`,
});
console.log("Exporting", note.title);
- const content: string = await note.export(format, null).catch(() => {});
+ const content: string = await note.export(format, null).catch((e) => {
+ showToast("error", e.message);
+ });
if (!content) continue;
files.push({ filename: note.title, content });
}