@@ -248,6 +248,11 @@ export function renderDocx(inputDocxPath, outputDocxName, options){
});
// Render the document (Replace {first_name} by John, {last_name} by Doe, ...)
+ Object.keys(options).forEach(key=>{ // 除去空值
+ if(options[key]==undefined){
+ options[key] = ""
+ }
+ })
doc.render(options);
// Get the zip document and generate it as a nodebuffer