Skip to content

Build your personal knowledge base with Trilium Notes

fix(print): crash when printing presentation

Elian Doran5d1a63bce070
diff --git a/apps/client/src/widgets/NoteDetail.tsx b/apps/client/src/widgets/NoteDetail.tsx
index bb47dc80c1..64a485188e 100644
--- a/apps/client/src/widgets/NoteDetail.tsx
+++ b/apps/client/src/widgets/NoteDetail.tsx
@@ -363,8 +363,8 @@ function showToast(type: "printing" | "exporting_pdf", progress: number = 0) {
});
}
-function handlePrintReport(printReport: PrintReport) {
- if (printReport.type === "collection" && printReport.ignoredNoteIds.length > 0) {
+function handlePrintReport(printReport?: PrintReport) {
+ if (printReport?.type === "collection" && printReport.ignoredNoteIds.length > 0) {
toast.showPersistent({
id: "print-report",
icon: "bx bx-collection",