From a13e63bb5ec3d2a67a4f27a886268ca602051a9a Mon Sep 17 00:00:00 2001 From: alexjg Date: Tue, 5 Jan 2021 09:32:51 +0000 Subject: [PATCH] fix(pdf): fix TypeError when exporting resume to PDF (#486) --- lib/export-resume.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/export-resume.js b/lib/export-resume.js index b340eebd..bbc0370f 100644 --- a/lib/export-resume.js +++ b/lib/export-resume.js @@ -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'); @@ -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, });