Skip to content

Commit

Permalink
fixed multi page pdf output bug 🐞
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgraffis committed Jul 10, 2021
1 parent d538feb commit 19b6392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function buildPDF(html, name) {

//Replace the vite html file with our changed one
await fs.writeFile(`dist/${location}`, dom.serialize())
const newHTML = await fs.readFile('dist/index.html', 'utf8')
const newHTML = await fs.readFile(`dist/${location}`, 'utf8')
console.log(`Updated ${location} for Puppeteer...`)
await buildPDF(newHTML, location === 'index.html' ? 'resume' : location.split('/')[0])
}
Expand Down

0 comments on commit 19b6392

Please sign in to comment.