mirror of
https://github.com/marktext/marktext.git
synced 2025-05-04 08:10:50 +08:00
* bugfix: #338 error message on export cancel * fixed the solution * put package-lock.json back
This commit is contained in:
parent
1073e650cc
commit
1f0b65d95c
@ -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) => {
|
||||
@ -39,6 +40,7 @@ const handleResponseForExport = (e, { type, content, pathname }) => {
|
||||
})
|
||||
.catch(log)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const handleResponseForSave = (e, { id, markdown, pathname, options }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user