Skip to content

Commit

Permalink
fix copying temp html to an external device
Browse files Browse the repository at this point in the history
  • Loading branch information
travs authored and elliotblackburn committed Mar 10, 2020
1 parent 2ff1ad2 commit a9fbc37
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ function createPdf(html, options) {
})
.then(() => {
if (options.debug) {
fs.renameSync(tempHtmlPath, options.debug);
} else {
fs.unlinkSync(tempHtmlPath);
fs.copyFileSync(tempHtmlPath, options.debug);
}
fs.unlinkSync(tempHtmlPath);

return options.destination;
});
Expand Down

0 comments on commit a9fbc37

Please sign in to comment.