mirror of
https://github.com/zadam/trilium.git
synced 2025-11-26 02:24:23 +01:00
feat(print): avoid error message for print job cancelled
This commit is contained in:
parent
135ce2285d
commit
494bd425af
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user