mirror of
https://github.com/marktext/marktext.git
synced 2025-05-07 18:01:05 +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
|
defaultPath
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (filePath) {
|
||||||
// If export PDF, the content will be undefined.
|
// If export PDF, the content will be undefined.
|
||||||
if (!content && type === 'pdf') {
|
if (!content && type === 'pdf') {
|
||||||
win.webContents.printToPDF({ printBackground: true }, (err, data) => {
|
win.webContents.printToPDF({ printBackground: true }, (err, data) => {
|
||||||
@ -40,6 +41,7 @@ const handleResponseForExport = (e, { type, content, pathname }) => {
|
|||||||
.catch(log)
|
.catch(log)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const handleResponseForSave = (e, { id, markdown, pathname, options }) => {
|
const handleResponseForSave = (e, { id, markdown, pathname, options }) => {
|
||||||
const win = BrowserWindow.fromWebContents(e.sender)
|
const win = BrowserWindow.fromWebContents(e.sender)
|
||||||
|
Loading…
Reference in New Issue
Block a user