diff options
Diffstat (limited to 'electron')
| -rw-r--r-- | electron/src/main.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/electron/src/main.js b/electron/src/main.js index f78680e0..2774ddc6 100644 --- a/electron/src/main.js +++ b/electron/src/main.js @@ -44,7 +44,8 @@ app.on('window-all-closed', () => { ipcMain.on('print', function (event, pageSize) { mainWindow.webContents.printToPDF({"pageSize": pageSize}, function(error, data) { dialog.showSaveDialog(mainWindow, {"defaultPath": "inkstitch.pdf"}, function(filename, bookmark) { - fs.writeFileSync(filename, data, 'utf-8'); + if (typeof filename !== 'undefined') + fs.writeFileSync(filename, data, 'utf-8'); }) }) })
\ No newline at end of file |
