Skip to content

Commit

Permalink
closeSync
Browse files Browse the repository at this point in the history
  • Loading branch information
domas committed Aug 13, 2019
1 parent 152c8bb commit 85edd9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/htmlboilerplate-pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ function htmlBoilerplatePDF (opts) {
// Create tmp file to save HTML for phantom to process
tmp.file({postfix: ".html"}, function (er, tmpHtmlPath, tmpHtmlFd) {
if (er) return outputStream.emit("error", er);
fs.close(tmpHtmlFd);
fs.closeSync(tmpHtmlFd);

// Create tmp file to save PDF to
tmp.file({postfix: ".pdf"}, function (er, tmpPdfPath, tmpPdfFd) {
if (er) return outputStream.emit("error", er);
fs.close(tmpPdfFd);
fs.closeSync(tmpPdfFd);

var htmlToTmpHtmlFile = fs.createWriteStream(tmpHtmlPath);

Expand Down

0 comments on commit 85edd9c

Please sign in to comment.