mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
chore(review): use async
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import fs from "fs";
|
||||
import fs from "fs/promises";
|
||||
import path from "path";
|
||||
import url from "url";
|
||||
import port from "./port.js";
|
||||
@@ -83,7 +83,7 @@ ipcMain.on("export-as-pdf", async (e, opts: ExportAsPdfOpts) => {
|
||||
}
|
||||
|
||||
try {
|
||||
fs.writeFileSync(filePath, buffer);
|
||||
await fs.writeFile(filePath, buffer);
|
||||
} catch (e) {
|
||||
dialog.showErrorBox(t("pdf.unable-to-export-title"), t("pdf.unable-to-save-message"));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user