feat(print): avoid error message for print job cancelled

This commit is contained in:
Elian Doran 2025-11-22 10:13:46 +02:00
parent 135ce2285d
commit 494bd425af
No known key found for this signature in database

View File

@ -82,7 +82,7 @@ interface ExportAsPdfOpts {
electron.ipcMain.on("print-note", async (e, { notePath }: PrintOpts) => {
const browserWindow = await getBrowserWindowForPrinting(e, notePath, "printing");
browserWindow.webContents.print({}, (success, failureReason) => {
if (!success) {
if (!success && failureReason !== "Print job canceled") {
electron.dialog.showErrorBox(t("pdf.unable-to-print"), failureReason);
}
e.sender.send("print-done");