From: Alexander Salas Date: Sun, 20 Sep 2015 22:28:41 +0000 (-0430) Subject: err undefined X-Git-Tag: v0.33.2~22^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=40b861bc9cb5c4f8b9bdb23cef7f897881861c79;p=electron.git err undefined --- diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index e8f72cd2..3b7363fd 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -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."); })