diff --git a/README.md b/README.md index db5c23f..c9020e9 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ pdf.create(html, options).toFile('./businesscard.pdf', function(err, res) { ```js var pdf = require('html-pdf'); -pdf.create(html).toFile([filepath, ]function(err, res){ +pdf.create(html).toFile([filepath, ], function(err, res){ console.log(res.filename); }); diff --git a/lib/pdf.js b/lib/pdf.js index afb8791..af5cac5 100644 --- a/lib/pdf.js +++ b/lib/pdf.js @@ -75,7 +75,7 @@ PDF.prototype.toStream = function PdfToStream (callback) { } PDF.prototype.toFile = function PdfToFile (filename, callback) { - assert(arguments.length > 0, 'html-pdf: The method .toFile([filename, ]callback) requires a callback.') + assert(arguments.length > 0, 'html-pdf: The method .toFile([filename, ], callback) requires a callback.') if (filename instanceof Function) { callback = filename filename = undefined