Skip to content

Commit

Permalink
fix(pdf): fix TypeError when exporting resume to PDF (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjg authored Jan 5, 2021
1 parent d3f896e commit a13e63b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/export-resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const extractFileFormat = (fileName) => {
}
return fileName.substring(dotPos + 1).toLowerCase();
};

const getThemePkg = (theme) => {
if (theme[0] === '.') {
theme = path.join(process.cwd(), theme, 'index.js');
Expand Down Expand Up @@ -84,7 +83,10 @@ const createPdf = (resumeJson, fileName, theme, format, callback) => {
puppeteerLaunchArgs.push('--no-sandbox');
}

const html = await renderHTML(resumeJson, theme);
const html = await renderHTML({
resume: resumeJson,
themePath: theme,
});
const browser = await puppeteer.launch({
args: puppeteerLaunchArgs,
});
Expand Down

0 comments on commit a13e63b

Please sign in to comment.