Merge pull request #2846 from alexsalas/patch-1

err undefined
This commit is contained in:
Cheng Zhao 2015-09-22 23:42:51 +08:00
commit 7165aa5467

View file

@ -419,7 +419,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.");
})