From 854400093a5c150fa447a4c0524359adeecc8335 Mon Sep 17 00:00:00 2001 From: jwmann Date: Mon, 3 Feb 2020 14:28:27 -0500 Subject: [PATCH 1/2] Fix Object.assign warning for safer code runtime --- src/masterToPDF.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/masterToPDF.js b/src/masterToPDF.js index f60ef03..bdbe037 100644 --- a/src/masterToPDF.js +++ b/src/masterToPDF.js @@ -21,7 +21,7 @@ exports.masterToPDF = async function (masterPath, relaxedGlobals, tempHTMLPath, } pluginPugHeaders = pluginPugHeaders.join('\n\n') - var pugFilters = Object.assign(...pluginHooks.pugFilters.map(o => o.instance)) + var pugFilters = Object.assign([], ...pluginHooks.pugFilters.map(o => o.instance)) try { var masterPug = fs.readFileSync(masterPath, 'utf8') From 4f0e87675c271b5eb900ba035b28df3717c251f1 Mon Sep 17 00:00:00 2001 From: jwmann Date: Mon, 3 Feb 2020 15:08:59 -0500 Subject: [PATCH 2/2] Fix base object assign parameter --- src/masterToPDF.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/masterToPDF.js b/src/masterToPDF.js index bdbe037..113779d 100644 --- a/src/masterToPDF.js +++ b/src/masterToPDF.js @@ -21,7 +21,7 @@ exports.masterToPDF = async function (masterPath, relaxedGlobals, tempHTMLPath, } pluginPugHeaders = pluginPugHeaders.join('\n\n') - var pugFilters = Object.assign([], ...pluginHooks.pugFilters.map(o => o.instance)) + var pugFilters = Object.assign({}, ...pluginHooks.pugFilters.map(o => o.instance)) try { var masterPug = fs.readFileSync(masterPath, 'utf8')