err undefined

This commit is contained in:
Alexander Salas 2015-09-20 17:58:41 -04:30
parent 7bb9595b81
commit 40b861bc9c

View file

@ -415,7 +415,7 @@ win.webContents.on("did-finish-load", function() {
win.webContents.printToPDF({}, function(error, data) {
if (error) throw error;
fs.writeFile("/tmp/print.pdf", data, function(error) {
if (err)
if (error)
throw error;
console.log("Write PDF successfully.");
})