bugfix: #338 error message on export cancel (#364)

* bugfix: #338 error message on export cancel

* fixed the solution

* put package-lock.json back
This commit is contained in:
mklpiening 2018-06-19 04:26:27 +02:00 committed by 冉四夕
parent 1073e650cc
commit 1f0b65d95c

View File

@ -20,6 +20,7 @@ const handleResponseForExport = (e, { type, content, pathname }) => {
defaultPath
})
if (filePath) {
// If export PDF, the content will be undefined.
if (!content && type === 'pdf') {
win.webContents.printToPDF({ printBackground: true }, (err, data) => {
@ -40,6 +41,7 @@ const handleResponseForExport = (e, { type, content, pathname }) => {
.catch(log)
}
}
}
const handleResponseForSave = (e, { id, markdown, pathname, options }) => {
const win = BrowserWindow.fromWebContents(e.sender)